Files
LehrerApp/LehrerApp.Desktop/Views/Settings/GradingKeyTemplateDialog.axaml
T
adminandClaude Sonnet 5 3fc506adc1 Notenschlüssel-Editor (1.3) und Einstellungen in Tabs strukturiert
- Notenschlüssel-Editor im ExamDialog: Stufen (Note/Prozentgrenze)
  bearbeitbar, Vorbelegung passend zum GradingSystem der Gruppe,
  Live-Anzeige der absoluten Punktegrenze je Stufe, Validierung
  (lückenlos, keine Dopplungen) über GradingService.ValidateGradingKey.
- Neues Modell GradingKeyTemplate + Repository: Notenschlüssel als
  Vorlage speichern/anwenden, direkt aus dem ExamDialog heraus.
- Einstellungen: Fächer / Kompetenzen / Notenschlüssel-Vorlagen sind
  jetzt eigene Tabs statt einer gemeinsam wachsenden Liste. Vorlagen
  zeigen nur noch eine kompakte Zeile; die Stufen-Bearbeitung läuft
  über ein Popup-Fenster (GradingKeyTemplateDialog).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-12 00:34:43 +02:00

47 lines
2.3 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.Settings"
x:Class="LehrerApp.Desktop.Views.Settings.GradingKeyTemplateDialog"
x:DataType="vm:GradingKeyTemplateEditItem"
Title="{Binding Name}"
Width="420" SizeToContent="Height" MinHeight="300"
CanResize="False" WindowStartupLocation="CenterOwner">
<Grid RowDefinitions="*,Auto" Margin="24">
<StackPanel Grid.Row="0" Spacing="10">
<StackPanel>
<TextBlock Text="{Binding Name}" FontSize="18" FontWeight="SemiBold"/>
<TextBlock Text="{Binding GradingSystemLabel}" FontSize="12" Opacity="0.5"/>
</StackPanel>
<TextBlock Text="{Binding CompletenessWarning}" Foreground="Red" FontSize="12" TextWrapping="Wrap"
IsVisible="{Binding CompletenessWarning, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
<ItemsControl ItemsSource="{Binding Entries}">
<ItemsControl.ItemTemplate>
<DataTemplate x:DataType="vm:GradingKeyEntryVm">
<Grid ColumnDefinitions="*,Auto" Margin="0,3">
<TextBlock Grid.Column="0" Text="{Binding Display}" VerticalAlignment="Center" FontSize="13"/>
<Button Grid.Column="1" Content="×" Padding="7,2" FontSize="13" Command="{Binding DeleteCommand}"/>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<TextBlock Text="{Binding Validation}" Foreground="Red" FontSize="11"
IsVisible="{Binding Validation, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
<Grid ColumnDefinitions="*,8,90,8,Auto">
<TextBox Grid.Column="0" Text="{Binding NewGrade}"
PlaceholderText="Note (z.B. 2 oder 11)" FontSize="12"/>
<NumericUpDown Grid.Column="2" Value="{Binding NewMinPercent}" Minimum="0" Maximum="100"
FormatString="0.##" ShowButtonSpinner="False" FontSize="12"
ToolTip.Tip="Mindest-Prozentgrenze"/>
<Button Grid.Column="4" Content="" Command="{Binding AddEntryCommand}"/>
</Grid>
</StackPanel>
<Button Grid.Row="1" Content="Fertig" HorizontalAlignment="Stretch" Margin="0,20,0,0" Click="OnClose"/>
</Grid>
</Window>