Klausuren-Hauptseite: gruppenübergreifende Liste mit Prioritäts-Score statt Datum
Sidebar-Klausuren war bisher ein Placeholder. Neue Seite zeigt alle Klausuren des Schuljahres sortiert nach abgeleiteter Dringlichkeit (Korrekturfortschritt statt manuellem Status), mit Detailbereich, Parallelkurs-Umschalter und Notenspiegel. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using LehrerApp.Core.Interfaces;
|
||||
using LehrerApp.Core.Models;
|
||||
using LehrerApp.Core.Services;
|
||||
@@ -52,6 +53,16 @@ public partial class ExamGradingDialogViewModel : ObservableObject
|
||||
|
||||
private void SaveRow(ExamResultRow row) => _results.Save(row.ToModel(_exam.Id));
|
||||
|
||||
/// Rest als abwesend markieren (Nutzerwunsch): Schüler, die nie nachschreiben, blockieren
|
||||
/// sonst dauerhaft den live abgeleiteten Korrekturstatus (ExamPriorityService), weil niemand
|
||||
/// eine leere Zeile anfasst, für die es nichts einzutragen gibt. Rührt bewusst nur unberührte
|
||||
/// Zeilen an — bereits eingetragene Punkte/Kommentare bleiben unangetastet.
|
||||
[RelayCommand]
|
||||
private void MarkRemainingAbsent()
|
||||
{
|
||||
foreach (var row in Rows.Where(r => !r.Absent && r.Cells.All(c => c.Value is null)))
|
||||
row.Absent = true;
|
||||
}
|
||||
}
|
||||
|
||||
// ── Zeile im Punkteraster ──────────────────────────────────────────────────
|
||||
|
||||
@@ -21,6 +21,7 @@ public partial class ExamDialogViewModel : ObservableObject
|
||||
private readonly int _gradeLevel;
|
||||
private readonly GradingSystem _gradingSystem;
|
||||
private readonly Exam? _editingExam;
|
||||
private readonly Exam? _duplicateSource;
|
||||
private readonly string _subjectName;
|
||||
|
||||
[ObservableProperty] private string _title = "";
|
||||
@@ -68,6 +69,7 @@ public partial class ExamDialogViewModel : ObservableObject
|
||||
_groupId = groupId; _subjectId = subjectId; _gradeLevel = gradeLevel;
|
||||
_gradingSystem = gradingSystem;
|
||||
_editingExam = editingExam;
|
||||
_duplicateSource = duplicateSource;
|
||||
_subjectName = defaultSubjectName;
|
||||
IsDifferentiated = isDifferentiated;
|
||||
|
||||
@@ -304,6 +306,11 @@ public partial class ExamDialogViewModel : ObservableObject
|
||||
Result.Niveau = NiveauDisplay.FromName(SelectedNiveauName);
|
||||
Result.Tasks = Tasks.Select(t => t.ToModel()).ToList();
|
||||
Result.GradingKey = gradingKey;
|
||||
// Parallelkurse (gleiche Arbeit, mehrere Kurse): beim Duplizieren verknüpfen, damit die
|
||||
// Klausuren-Hauptseite zwischen ihnen umschalten kann. Der Anker ist die Id der zuerst
|
||||
// angelegten Klausur der Kette — schon verknüpfte Quellen geben ihren Anker weiter.
|
||||
if (_duplicateSource is not null)
|
||||
Result.SharedExamGroupId = _duplicateSource.SharedExamGroupId ?? _duplicateSource.Id;
|
||||
_exams.Save(Result);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user