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>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<Window xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:vm="clr-namespace:LehrerApp.Desktop.ViewModels.Groups"
|
||||
xmlns:models="clr-namespace:LehrerApp.Core.Models;assembly=LehrerApp.Core"
|
||||
x:Class="LehrerApp.Desktop.Views.Groups.ExamDialog"
|
||||
x:DataType="vm:ExamDialogViewModel"
|
||||
Title="{Binding DialogTitle}"
|
||||
@@ -112,6 +113,51 @@
|
||||
|
||||
<TextBlock Text="{Binding ValidationMessage}" Foreground="Red" FontSize="12"
|
||||
IsVisible="{Binding ValidationMessage, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
|
||||
|
||||
<Separator Margin="0,4"/>
|
||||
|
||||
<Grid ColumnDefinitions="*,Auto">
|
||||
<TextBlock Grid.Column="0" Text="Notenschlüssel" FontSize="14" FontWeight="SemiBold" VerticalAlignment="Center"/>
|
||||
<Button Grid.Column="1" Content="+ Stufe" Command="{Binding AddGradingKeyRowCommand}"/>
|
||||
</Grid>
|
||||
|
||||
<Grid ColumnDefinitions="*,8,Auto">
|
||||
<ComboBox Grid.Column="0" ItemsSource="{Binding AvailableTemplates}"
|
||||
SelectedItem="{Binding SelectedTemplate}"
|
||||
PlaceholderText="Vorlage auswählen" HorizontalAlignment="Stretch">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate x:DataType="models:GradingKeyTemplate">
|
||||
<TextBlock Text="{Binding Name}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<Button Grid.Column="2" Content="Anwenden" Command="{Binding ApplyTemplateCommand}"/>
|
||||
</Grid>
|
||||
|
||||
<ItemsControl ItemsSource="{Binding GradingKeyEntries}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate x:DataType="vm:GradingKeyEntryEditItem">
|
||||
<Grid ColumnDefinitions="90,90,*,Auto" Margin="0,0,0,6">
|
||||
<TextBox Grid.Column="0" Text="{Binding Grade}" PlaceholderText="Note" Margin="0,0,6,0"/>
|
||||
<NumericUpDown Grid.Column="1" Value="{Binding MinPercent}" Minimum="0" Maximum="100"
|
||||
FormatString="0.##" Width="90" ShowButtonSpinner="False" Margin="0,0,6,0"
|
||||
ToolTip.Tip="Mindest-Prozentgrenze"/>
|
||||
<TextBlock Grid.Column="2" Text="{Binding AbsolutePointsDisplay}" FontSize="12" Opacity="0.65"
|
||||
VerticalAlignment="Center"/>
|
||||
<Button Grid.Column="3" Content="✕" Command="{Binding RemoveCommand}" Padding="6,2"
|
||||
ToolTip.Tip="Entfernen"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
|
||||
<TextBlock Text="{Binding GradingKeyValidation}" Foreground="Red" FontSize="12"
|
||||
IsVisible="{Binding GradingKeyValidation, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
|
||||
|
||||
<Grid ColumnDefinitions="*,8,Auto">
|
||||
<TextBox Grid.Column="0" Text="{Binding NewTemplateName}" PlaceholderText="Name für neue Vorlage"/>
|
||||
<Button Grid.Column="2" Content="Als Vorlage speichern" Command="{Binding SaveAsTemplateCommand}"/>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user