Files
LehrerApp/LehrerApp.Desktop/Views/Groups/ParticipationAspectsDialog.axaml
T
adminandClaude Sonnet 5 16ff4875d8 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>
2026-08-17 00:12:16 +02:00

88 lines
5.5 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="clr-namespace:LehrerApp.Desktop.ViewModels.Groups"
x:Class="LehrerApp.Desktop.Views.Groups.ParticipationAspectsDialog"
x:DataType="vm:ParticipationAspectsDialogViewModel"
Title="Mitarbeit-Aspekte verwalten"
Width="620" Height="620" MinWidth="520" MinHeight="380"
CanResize="True" WindowStartupLocation="CenterOwner">
<Grid RowDefinitions="*,Auto" Margin="24">
<ScrollViewer Grid.Row="0">
<StackPanel Spacing="14" Margin="0,0,12,0">
<TextBlock Text="Mitarbeit-Aspekte" Classes="dialogtitle"/>
<TextBlock Text="Gilt nur für diese Gruppe, zusätzlich zu den globalen Standardaspekten (Qualität, Quantität, Arbeitsphase)."
FontSize="12" Opacity="0.6" TextWrapping="Wrap"/>
<ItemsControl ItemsSource="{Binding Aspects}">
<ItemsControl.ItemTemplate>
<DataTemplate x:DataType="vm:AspectEditItem">
<Border BorderBrush="{DynamicResource SystemControlForegroundBaseLowBrush}"
BorderThickness="0,0,0,1" Padding="0,8">
<StackPanel Spacing="4">
<Grid ColumnDefinitions="70,*,120,55,80,60,26,26,26">
<TextBlock Grid.Column="0" Text="{Binding Key}" FontSize="12" Opacity="0.6"
VerticalAlignment="Center" Margin="0,0,8,0" TextTrimming="CharacterEllipsis"
ToolTip.Tip="Schlüssel, nach dem Neuanlegen nicht mehr änderbar (Verknüpfung zu bereits erfassten Bewertungen)."/>
<TextBox Grid.Column="1" Text="{Binding Label}" Margin="0,0,6,0"/>
<ComboBox Grid.Column="2" ItemsSource="{Binding ValueTypeOptions}"
SelectedItem="{Binding ValueTypeName}" Margin="0,0,6,0"/>
<NumericUpDown Grid.Column="3" Value="{Binding MaxPoints}" Minimum="1" Maximum="100"
FormatString="0" ShowButtonSpinner="False" Margin="0,0,6,0"
IsVisible="{Binding IsPointsType}"
ToolTip.Tip="Maximal erreichbare Punktzahl."/>
<NumericUpDown Grid.Column="4" Value="{Binding Weight}" Minimum="0" Maximum="10"
FormatString="0.0" Increment="0.1" ShowButtonSpinner="False" Margin="0,0,6,0"/>
<CheckBox Grid.Column="5" Content="Aktiv" IsChecked="{Binding IsActive}"
VerticalAlignment="Center" Margin="0,0,4,0"
ToolTip.Tip="Deaktivieren statt löschen, damit bereits erfasste Bewertungen dieses Aspekts gültig bleiben."/>
<Button Grid.Column="6" Content="↑" Command="{Binding MoveUpCommand}" Padding="4,2"
ToolTip.Tip="Nach oben"/>
<Button Grid.Column="7" Content="↓" Command="{Binding MoveDownCommand}" Padding="4,2"
Margin="2,0,0,0" ToolTip.Tip="Nach unten"/>
<Button Grid.Column="8" Content="✕" Command="{Binding DeleteCommand}" Padding="4,2"
Margin="2,0,0,0" ToolTip.Tip="Endgültig löschen"/>
</Grid>
<TextBlock Text="{Binding ErrorMessage}" Foreground="Red" FontSize="11"
IsVisible="{Binding ErrorMessage, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
</StackPanel>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<TextBlock Text="Noch keine gruppenspezifischen Aspekte." Classes="emptyhint"
IsVisible="{Binding !Aspects.Count}"/>
<Separator Margin="0,4"/>
<TextBlock Text="Neuer Aspekt" FontSize="14" FontWeight="SemiBold"/>
<Grid ColumnDefinitions="*,12,*,12,140,12,90">
<StackPanel Grid.Column="0" Spacing="4">
<TextBlock Text="Schlüssel *" FontSize="12" Opacity="0.7"/>
<TextBox Text="{Binding NewKey}" PlaceholderText="z.B. experiment"/>
</StackPanel>
<StackPanel Grid.Column="2" Spacing="4">
<TextBlock Text="Bezeichnung *" FontSize="12" Opacity="0.7"/>
<TextBox Text="{Binding NewLabel}" PlaceholderText="z.B. Experiment"/>
</StackPanel>
<StackPanel Grid.Column="4" Spacing="4">
<TextBlock Text="Typ" FontSize="12" Opacity="0.7"/>
<ComboBox ItemsSource="{Binding ValueTypeOptions}" SelectedItem="{Binding NewValueTypeName}"
HorizontalAlignment="Stretch"/>
</StackPanel>
<StackPanel Grid.Column="6" Spacing="4" IsVisible="{Binding IsNewPointsType}">
<TextBlock Text="Max. Punkte" FontSize="12" Opacity="0.7"/>
<NumericUpDown Value="{Binding NewMaxPoints}" Minimum="1" Maximum="100"
FormatString="0" ShowButtonSpinner="False"/>
</StackPanel>
</Grid>
<TextBlock Text="{Binding NewAspectError}" Foreground="Red" FontSize="12"
IsVisible="{Binding NewAspectError, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
<Button Content=" Aspekt hinzufügen" Command="{Binding AddAspectCommand}" HorizontalAlignment="Left"/>
</StackPanel>
</ScrollViewer>
<Button Grid.Row="1" Content="Fertig" HorizontalAlignment="Right" Margin="0,20,0,0" Click="OnClose"/>
</Grid>
</Window>