Mitarbeitsnote-Aggregation (3.2)

Neuer Dialog berechnet aus den Sitzungs-Bewertungen je Schüler eine
Mitarbeitsnote (H1/H2/Gesamtjahr), mit editierbarer Aspekt-Gewichtung,
Trendanzeige und Übernahme als Grade (Category=Participation).
This commit is contained in:
2026-08-12 14:10:04 +02:00
parent 482942ce09
commit 182c386cc5
9 changed files with 392 additions and 7 deletions
+1
View File
@@ -44,6 +44,7 @@ public class ParticipationAspect
public string Key { get; set; } = "";
public string Label { get; set; } = "";
public AspectValueType ValueType { get; set; } = AspectValueType.Scale5;
public double Weight { get; set; } = 1.0;
public bool IsActive { get; set; } = true;
public int SortOrder { get; set; }
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
@@ -55,6 +55,15 @@ public class GradingService
return null;
}
/// Wandelt eine Mitarbeit-Bewertung im Bereich -2..+2 in eine Note/Punktzahl
/// nach dem jeweiligen Notensystem der Gruppe um (0 % = -2, 100 % = +2).
public string ParticipationGrade(double averageRating, GradingSystem system)
{
var percent = Math.Clamp((averageRating + 2.0) / 4.0 * 100.0, 0, 100);
var key = system == GradingSystem.Points0To15 ? DefaultKey0To15() : DefaultKey1To6();
return CalculateGrade(percent, 100, key);
}
public double WeightedAverage(List<(string Grade, double Weight)> grades)
{
var numeric = grades