Automate overdue homework and show outstanding work in teaching mode
CI / build-and-test (push) Canceled after 0s

This commit is contained in:
admin committed 2026-09-25 22:02:00 +02:00
1 parent f3e23ad207
commit 4b73d2bea2
10 files changed
+314 -2

No files matched your search

@@ -157,6 +157,35 @@
</StackPanel>
</Border>
<Expander Header="{Binding OutstandingHomework.Header}"
IsExpanded="{Binding OutstandingHomework.IsExpanded}">
<StackPanel Spacing="8" Margin="0,6,0,0">
<TextBlock Text="Jüngste fehlende Hausaufgaben der Lerngruppe (letzte 120 Tage)."
FontSize="11" Opacity="0.65" TextWrapping="Wrap"/>
<CheckBox Content="Abwesende dieser Stunde anzeigen"
IsChecked="{Binding OutstandingHomework.IncludeAbsentStudents}" FontSize="12"/>
<Button Content="Aktualisieren" Command="{Binding OutstandingHomework.RefreshCommand}"
HorizontalAlignment="Left" FontSize="11" Padding="6,4"/>
<TextBlock Text="Keine offenen Nachreichungen für die angezeigten Schüler."
IsVisible="{Binding !OutstandingHomework.HasRows}" FontSize="12" TextWrapping="Wrap"/>
<ItemsControl ItemsSource="{Binding OutstandingHomework.Rows}">
<ItemsControl.ItemTemplate>
<DataTemplate x:DataType="vm:OutstandingHomeworkRow">
<Border Background="{DynamicResource SystemControlBackgroundAltHighBrush}"
CornerRadius="5" Padding="8,6" Margin="0,0,0,5">
<StackPanel Spacing="2">
<TextBlock Text="{Binding StudentName}" FontWeight="SemiBold" TextWrapping="Wrap"/>
<TextBlock FontSize="11" Opacity="0.75" TextWrapping="Wrap">
<Run Text="{Binding DateLabel}"/><Run Text=" · "/><Run Text="{Binding StatusLabel}"/>
</TextBlock>
</StackPanel>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
</Expander>
<StackPanel Spacing="4">
<TextBlock Text="Hausaufgabe (diese Stunde)" FontSize="12" FontWeight="SemiBold" Opacity="0.6"/>
<TextBox Text="{Binding Homework.CurrentHomework, Mode=TwoWay}" AcceptsReturn="True"
@@ -26,13 +26,19 @@ public partial class TeachingModeWindow : Window
}
var group = App.Services.GetRequiredService<IGroupRepository>().GetById(lesson.GroupId);
if (group is null) return;
var outstandingHomework = new TeachingModeOutstandingHomeworkViewModel(group.Id, lesson.Date,
App.Services.GetRequiredService<IStudentRepository>(),
App.Services.GetRequiredService<IGroupMembershipRepository>(),
App.Services.GetRequiredService<IParticipationSessionRepository>(),
App.Services.GetRequiredService<IParticipationRepository>());
var window = new TeachingModeWindow
{
DataContext = new TeachingModeViewModel(lesson, group,
App.Services.GetRequiredService<IAlternativeLessonPathRepository>(),
App.Services.GetRequiredService<ILessonRepository>(),
App.Services.GetRequiredService<SeatingPlanTabViewModel>(),
App.Services.GetRequiredService<ParticipationTabViewModel>())
App.Services.GetRequiredService<ParticipationTabViewModel>(),
outstandingHomework)
};
OpenWindows.Add(lesson.Id, window);
window.Closed += (_, _) => OpenWindows.Remove(lesson.Id);
@@ -100,6 +106,7 @@ public partial class TeachingModeWindow : Window
var dialog = new AttendanceHomeworkQuickInputDialog { DataContext = quickVm };
await dialog.ShowDialog(this);
(DataContext as TeachingModeViewModel)?.SeatingPlan.ReloadSeatBadgesFromRepository();
(DataContext as TeachingModeViewModel)?.OutstandingHomework?.Refresh();
}
private void OnClose(object? sender, RoutedEventArgs e) => Close();