Tagesflagge im Sitzplan, Leistungsüberblick mit Zielnoten-Rechner
CI / build-and-test (push) Canceled after 0s

- Mitarbeit: Tagesflagge (👑 Spitzentag / 😴 Schlaftag /  Schlechter Tag)
  je Schüler und Sitzung. Primär im Sitzplatz-Dialog (⇧1/2/3, ⇧X) mit
  Badge auf der Sitzplatz-Kachel; Fallback in der Schnelleingabe für
  Lerngruppen ohne Sitzplan.
- Noten: neuer Dialog "Überblick" in der Notenübersicht zeigt Klausuren,
  Mitarbeit- und sonstige Noten eines Schülers samt berechneter
  Zeugnisnote. Zielnoten-Rechner (ReportGradeTargetCalculator) beantwortet
  "was brauche ich noch für Note X", ein Was-wäre-wenn-Rechner simuliert
  eine zusätzliche Klausurnote. Bewerter-/Schülermodus per Umschalter im
  selben Fenster — Bewertermodus zeigt zusätzlich Kursdurchschnitt je
  Klausur und erlaubt das Bearbeiten von Mitarbeit-/Sonstige-Noten.
  Klausurverlauf als Balken-Sparkline wie die bestehende Notenentwicklung.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-30 11:43:47 +02:00
co-authored by Claude Sonnet 5
parent 84c03962ef
commit 1215d4ac22
20 changed files with 1087 additions and 4 deletions
@@ -158,6 +158,7 @@ public partial class ParticipationTabViewModel : ObservableObject
row.OnCompetencyRatingChanged = (sid, code, val) => SaveCompetencyRating(sessionId, sid, code, val);
row.HomeworkChangedCallback = (sid, val) => SaveHomework(sessionId, sid, val);
row.AttendanceChangedCallback = (sid, val) => SaveAttendance(sessionId, sid, val);
row.DayHighlightChangedCallback = (sid, val) => SaveDayHighlight(sessionId, sid, val);
StudentRows.Add(row);
}
QuickInputCommand.NotifyCanExecuteChanged();
@@ -212,6 +213,15 @@ public partial class ParticipationTabViewModel : ObservableObject
_entries.Save(entry);
}
private void SaveDayHighlight(Guid sessionId, Guid studentId, DayHighlightKind? value)
{
if (IsReadOnly) return;
var entry = _entries.GetBySessionAndStudent(sessionId, studentId)
?? new ParticipationEntry { SessionId = sessionId, StudentId = studentId };
entry.DayHighlight = value;
_entries.Save(entry);
}
[RelayCommand]
private void ToggleCompetencyTags() => CompetencyTagsVisible = !CompetencyTagsVisible;
@@ -389,6 +399,7 @@ public partial class ParticipationStudentRow : ObservableObject
[ObservableProperty] private HomeworkStatus? _homework;
[ObservableProperty] private AttendanceStatus? _attendance;
[ObservableProperty] private DayHighlightKind? _dayHighlight;
public string AttendanceLabel => AttendanceDisplay.ShortLabel(Attendance);
public string AttendanceTooltip => AttendanceDisplay.Label(Attendance);
@@ -405,6 +416,7 @@ public partial class ParticipationStudentRow : ObservableObject
public Action<Guid, string, int?>? OnCompetencyRatingChanged { get; set; }
public Action<Guid, HomeworkStatus?>? HomeworkChangedCallback { get; set; }
public Action<Guid, AttendanceStatus?>? AttendanceChangedCallback { get; set; }
public Action<Guid, DayHighlightKind?>? DayHighlightChangedCallback { get; set; }
public ParticipationStudentRow(Guid id, string name, ParticipationEntry entry,
List<AspectColumnDef> aspects, List<string> competencyCodes)
@@ -414,6 +426,7 @@ public partial class ParticipationStudentRow : ObservableObject
_aspectDefs = aspects;
_homework = HomeworkDisplay.Effective(entry);
_attendance = entry.Attendance;
_dayHighlight = entry.DayHighlight;
foreach (var a in aspects)
{
@@ -463,6 +476,12 @@ public partial class ParticipationStudentRow : ObservableObject
HomeworkChangedCallback?.Invoke(StudentId, value);
}
public void SetDayHighlight(DayHighlightKind? value)
{
DayHighlight = value;
DayHighlightChangedCallback?.Invoke(StudentId, value);
}
[RelayCommand]
private void CycleAttendance()
{
@@ -614,6 +633,27 @@ public static class AttendanceDisplay
};
}
// ── Tagesflagge (Nutzer-Feedback) ──────────────────────────────────────────────
public static class DayHighlightDisplay
{
public static string Symbol(DayHighlightKind? kind) => kind switch
{
DayHighlightKind.Standout => "👑",
DayHighlightKind.Sleepy => "😴",
DayHighlightKind.Rough => "⚡",
_ => "",
};
public static string Label(DayHighlightKind? kind) => kind switch
{
DayHighlightKind.Standout => "Spitzentag",
DayHighlightKind.Sleepy => "Schlaftag",
DayHighlightKind.Rough => "Schlechter Tag",
_ => "Keine Markierung",
};
}
// ── Eine Bewertungszelle ──────────────────────────────────────────────────────
public partial class RatingCell : ObservableObject
@@ -800,12 +840,31 @@ public partial class QuickInputViewModel : ObservableObject
[ObservableProperty] private string _progressText = "";
[ObservableProperty] private bool _currentStudentIsAbsent;
[ObservableProperty] private string _currentStudentAttendanceLabel = "";
[ObservableProperty] private DayHighlightKind? _currentStudentDayHighlight;
/// Dimmt Name/Aspektliste, wenn der aktuelle Schüler abwesend ist — kein Blockieren der
/// Eingabe (manche Bewertungssysteme wollen trotzdem einen Eintrag, z.B. "0 Punkte"), nur ein
/// visueller Hinweis, dass eine Bewertung hier normalerweise keinen Sinn ergibt.
public double CurrentStudentContentOpacity => CurrentStudentIsAbsent ? 0.4 : 1.0;
/// Tagesflagge (Nutzer-Feedback): Fallback für Kurse ohne Sitzplan — im Sitzplatz-Dialog gibt
/// es dieselbe Auswahl bereits über SeatAssessmentViewModel.DayHighlightChoices.
public string CurrentStudentDayHighlightSymbol => DayHighlightDisplay.Symbol(CurrentStudentDayHighlight);
public string CurrentStudentDayHighlightLabel => DayHighlightDisplay.Label(CurrentStudentDayHighlight);
public void SetDayHighlight(DayHighlightKind? value)
{
if (_rows.Count == 0) return;
_rows[StudentIndex].SetDayHighlight(value);
CurrentStudentDayHighlight = value;
}
partial void OnCurrentStudentDayHighlightChanged(DayHighlightKind? value)
{
OnPropertyChanged(nameof(CurrentStudentDayHighlightSymbol));
OnPropertyChanged(nameof(CurrentStudentDayHighlightLabel));
}
public ObservableCollection<QuickAspectRow> AspectRows { get; } = [];
/// Wechselt je nach Typ des aktuell gewählten Aspekts (3.1.3) — Scale3/Binary haben andere
@@ -824,7 +883,8 @@ public partial class QuickInputViewModel : ObservableObject
_ => "15 bewerten",
};
return $"{ratingHint} · Q/W/E/R/T Aspekt wählen · Leertaste/↓ nächster Aspekt · ↑ vorheriger Aspekt · " +
"Enter/→ nächster Schüler · Backspace/← vorheriger Schüler · +/ anpassen · Entf nicht bewertet · Esc schließen";
"Enter/→ nächster Schüler · Backspace/← vorheriger Schüler · +/ anpassen · Entf nicht bewertet · " +
"⇧1/2/3 Tagesflagge, ⇧0 löschen · Esc schließen";
}
}
@@ -852,6 +912,7 @@ public partial class QuickInputViewModel : ObservableObject
ProgressText = $"{index + 1} / {_rows.Count}";
CurrentStudentIsAbsent = row.IsAbsent;
CurrentStudentAttendanceLabel = row.AttendanceTooltip;
CurrentStudentDayHighlight = row.DayHighlight;
AspectRows.Clear();
foreach (var (a, i) in _aspects.Select((a, i) => (a, i)))