3.1.3: Aspekt-Typen Scale3/Binary/Points in Raster und Dialog unterstützt
Neue Klasse ParticipationRatingScale (Core) ist die einzige Quelle für Rohwerte je Aspekt-Typ. Scale3/Binary liegen bewusst direkt auf derselben -2..+2-Achse wie Scale5 (nur mit weniger Zwischenschritten), damit die bestehende Gewichtung/Mittelwertbildung zur Mitarbeitsnote unverändert kompatibel bleibt. Points ist grundverschieden (echter Zählwert 0..MaxPoints, neues Feld auf ParticipationAspect) und wird nur zur Aggregation linear auf dieselbe Achse normiert. Ohne diese Normierung hätte ein Punkte-Aspekt die Mitarbeitsnote verfälscht: drei Stellen summierten bisher den Rohwert direkt (ParticipationGradeDialog- ViewModel.Recompute, ParticipationWizardViewModels.WeightedRating und .ComputeSuggestion) - alle drei sind jetzt auf die Normierung umgestellt. Raster: Punkte-Aspekte zeigen ein NumericUpDown statt fester Stufen-Buttons. Schnelleingabe-Dialog: Zifferntasten/+/- sind jetzt typabhängig, Legende zeigt live die für den aktuellen Aspekt gültigen Tasten. Aspekt-Verwaltung um "Max. Punkte"-Feld ergänzt (nur bei Typ "Punkte" sichtbar). Bewusst nicht angefasst: die Trendlinien-Visualisierung im Mitarbeits-Assistenten bleibt fest auf die drei Standardaspekte zugeschnitten - eigener, größerer Umbau. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -35,6 +35,9 @@ public partial class ParticipationGradeDialogViewModel : ObservableObject
|
||||
|
||||
public ObservableCollection<ParticipationGradeRow> Rows { get; } = [];
|
||||
public ObservableCollection<AspectWeightItem> AspectWeights { get; } = [];
|
||||
// Für die Normierung von Punkte-Aspekten (3.1.3) auf die gemeinsame -2..+2-Achse vor der
|
||||
// Gewichtung — AspectWeightItem kennt selbst nur Key/Label/Weight, nicht ValueType/MaxPoints.
|
||||
private readonly Dictionary<string, ParticipationAspect> _aspectsByKey = [];
|
||||
|
||||
public ParticipationGradeDialogViewModel(
|
||||
IParticipationSessionRepository sessions, IParticipationRepository entries,
|
||||
@@ -63,6 +66,7 @@ public partial class ParticipationGradeDialogViewModel : ObservableObject
|
||||
|
||||
foreach (var a in all)
|
||||
{
|
||||
_aspectsByKey[a.Key] = a;
|
||||
var item = new AspectWeightItem(a, _aspects);
|
||||
item.OnChanged = Recompute;
|
||||
AspectWeights.Add(item);
|
||||
@@ -105,7 +109,10 @@ public partial class ParticipationGradeDialogViewModel : ObservableObject
|
||||
{
|
||||
var w = aspectWeights.TryGetValue(r.Key, out var aw) ? aw : 1.0;
|
||||
if (w <= 0) continue;
|
||||
valueSum += r.Value * w;
|
||||
var normalized = _aspectsByKey.TryGetValue(r.Key, out var aspect)
|
||||
? ParticipationRatingScale.Normalize(aspect.ValueType, r.Value, aspect.MaxPoints)
|
||||
: r.Value;
|
||||
valueSum += normalized * w;
|
||||
weightSum += w;
|
||||
}
|
||||
if (weightSum > 0) points.Add((session.Date, valueSum / weightSum));
|
||||
|
||||
Reference in New Issue
Block a user