Automate overdue homework and show outstanding work in teaching mode
CI / build-and-test (push) Canceled after 0s
CI / build-and-test (push) Canceled after 0s
This commit is contained in:
1 parent
f3e23ad207
commit
4b73d2bea2
10 files changed
+314
-2
No files matched your search
@@ -33,10 +33,12 @@ public class TeachingModeViewModel
|
||||
/// der richtigen Sitzung starten.</summary>
|
||||
public ParticipationTabViewModel Participation { get; }
|
||||
public TeachingModeHomeworkViewModel Homework { get; }
|
||||
public TeachingModeOutstandingHomeworkViewModel? OutstandingHomework { get; }
|
||||
|
||||
public TeachingModeViewModel(Lesson lesson, LearningGroup group,
|
||||
IAlternativeLessonPathRepository alternativePaths, ILessonRepository lessons,
|
||||
SeatingPlanTabViewModel seatingPlan, ParticipationTabViewModel participation)
|
||||
SeatingPlanTabViewModel seatingPlan, ParticipationTabViewModel participation,
|
||||
TeachingModeOutstandingHomeworkViewModel? outstandingHomework = null)
|
||||
{
|
||||
GroupName = group.Name;
|
||||
Timeline = new TeachingTimelineViewModel(lesson, lessons, !group.IsActive);
|
||||
@@ -52,6 +54,16 @@ public class TeachingModeViewModel
|
||||
if (SeatingPlan.SelectedSession is { } linkedSession)
|
||||
Participation.SelectedSession =
|
||||
Participation.Sessions.FirstOrDefault(s => s.Id == linkedSession.Id);
|
||||
OutstandingHomework = outstandingHomework;
|
||||
OutstandingHomework?.SetCurrentSessionId(SeatingPlan.SelectedSession?.Id);
|
||||
OutstandingHomework?.Refresh();
|
||||
SeatingPlan.OnAssessmentChanged = () => OutstandingHomework?.Refresh();
|
||||
SeatingPlan.PropertyChanged += (_, args) =>
|
||||
{
|
||||
if (args.PropertyName != nameof(SeatingPlan.SelectedSession)) return;
|
||||
OutstandingHomework?.SetCurrentSessionId(SeatingPlan.SelectedSession?.Id);
|
||||
OutstandingHomework?.Refresh();
|
||||
};
|
||||
|
||||
// 4.5.4: dieselbe "letzte Stunde vor dieser"-Suche wie das Stundenplan-Badge
|
||||
// "Hausaufgabe kontrollieren" (TimetableViewModel.HasUnhandledHomework) - 120 Tage
|
||||
|
||||
Reference in new issue
Block a user