feat: Bildungsplan-Versionierung für Kompetenzkataloge, vollständig über MCP exponiert
Neue Bildungspläne wachsen je Fach klassenstufenweise hoch, sodass Kurse abhängig vom Einschulungsjahr entweder dem alten oder dem neuen Bildungsplan folgen. CompetencyCatalogVersion (Fach + Name + IsDefault) macht das abbildbar: CompetencyDomain bekommt eine VersionId, Kurse wählen über LearningGroup.CompetencyCatalogVersionId (null = Standardversion des Fachs) welche Version gilt. Migration legt für bestehende Kataloge automatisch eine Standardversion an, damit alte Datenbanken unverändert weiterlaufen. MCP: neue Tools für Versions-CRUD (get/create/update/delete_competency_plan_version, update_group_competency_version), get_competency_catalog/create_competency_domain um optionalen versionId-Parameter erweitert. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4ffba35eff
commit
f97edff2fe
45 files changed
+1020
-163
No files matched your search
@@ -2,6 +2,7 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:vm="clr-namespace:LehrerApp.Desktop.ViewModels.Settings"
|
||||
xmlns:services="clr-namespace:LehrerApp.Core.Services;assembly=LehrerApp.Core"
|
||||
xmlns:models="clr-namespace:LehrerApp.Core.Models;assembly=LehrerApp.Core"
|
||||
xmlns:shared="clr-namespace:LehrerApp.Desktop.Views.Shared"
|
||||
x:Class="LehrerApp.Desktop.Views.Settings.SettingsView"
|
||||
x:DataType="vm:SettingsViewModel">
|
||||
@@ -112,8 +113,8 @@
|
||||
<ScrollViewer>
|
||||
<StackPanel Margin="32,20,32,28" Spacing="14" MaxWidth="640">
|
||||
|
||||
<!-- Fach + Klassenstufe Auswahl + Import/Export -->
|
||||
<Grid ColumnDefinitions="*,12,100,12,Auto,8,Auto,8,Auto">
|
||||
<!-- Fach + Klassenstufe + Bildungsplan-Version Auswahl + Import/Export -->
|
||||
<Grid ColumnDefinitions="*,12,90,12,160,12,Auto,8,Auto,8,Auto">
|
||||
<ComboBox Grid.Column="0"
|
||||
ItemsSource="{Binding Subjects}"
|
||||
SelectedItem="{Binding CatalogSubject}"
|
||||
@@ -128,15 +129,63 @@
|
||||
<NumericUpDown Grid.Column="2"
|
||||
Value="{Binding CatalogGradeLevel}"
|
||||
Minimum="1" Maximum="13" FormatString="0"/>
|
||||
<Button Grid.Column="4" Content="JSON importieren" Click="OnImportClick"
|
||||
<ComboBox Grid.Column="4"
|
||||
ItemsSource="{Binding CatalogVersions}"
|
||||
SelectedItem="{Binding CatalogVersion}"
|
||||
IsEnabled="{Binding CatalogSubject, Converter={x:Static ObjectConverters.IsNotNull}}"
|
||||
HorizontalAlignment="Stretch"
|
||||
ToolTip.Tip="Bildungsplan-Version dieses Katalogs">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate DataType="models:CompetencyCatalogVersion">
|
||||
<TextBlock Text="{Binding Name}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<Button Grid.Column="6" Content="JSON importieren" Click="OnImportClick"
|
||||
IsEnabled="{Binding CatalogSubject, Converter={x:Static ObjectConverters.IsNotNull}}"/>
|
||||
<Button Grid.Column="6" Content="JSON exportieren" Click="OnExportClick"
|
||||
<Button Grid.Column="8" Content="JSON exportieren" Click="OnExportClick"
|
||||
IsEnabled="{Binding CatalogSubject, Converter={x:Static ObjectConverters.IsNotNull}}"/>
|
||||
<Button Grid.Column="8" Content="Kopieren…" Click="OnCopyCatalogClick"
|
||||
<Button Grid.Column="10" Content="Kopieren…" Click="OnCopyCatalogClick"
|
||||
IsEnabled="{Binding CatalogSubject, Converter={x:Static ObjectConverters.IsNotNull}}"
|
||||
ToolTip.Tip="Katalog in eine andere Klassenstufe kopieren"/>
|
||||
ToolTip.Tip="Katalog in eine andere Klassenstufe (derselben Version) kopieren"/>
|
||||
</Grid>
|
||||
|
||||
<!-- Bildungsplan-Versionen verwalten -->
|
||||
<Border BorderBrush="{DynamicResource SystemControlForegroundBaseLowBrush}"
|
||||
BorderThickness="1" CornerRadius="6" Padding="14,12"
|
||||
IsVisible="{Binding CatalogSubject, Converter={x:Static ObjectConverters.IsNotNull}}">
|
||||
<StackPanel Spacing="10">
|
||||
<TextBlock Text="Bildungsplan-Versionen" FontSize="12" FontWeight="SemiBold" Opacity="0.7"
|
||||
ToolTip.Tip="Für schrittweise hochwachsende neue Bildungspläne: mehrere parallel gültige Kompetenzkataloge je Fach, je Kurs auswählbar."/>
|
||||
<ItemsControl ItemsSource="{Binding CatalogVersions}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="models:CompetencyCatalogVersion">
|
||||
<Grid ColumnDefinitions="*,Auto,8,Auto,8,Auto" Margin="0,3">
|
||||
<TextBlock Grid.Column="0" Text="{Binding Name}" VerticalAlignment="Center"/>
|
||||
<TextBlock Grid.Column="1" Text="Standard" FontSize="11" Opacity="0.6"
|
||||
VerticalAlignment="Center" IsVisible="{Binding IsDefault}"/>
|
||||
<Button Grid.Column="3" Content="Als Standard" FontSize="12" Padding="8,3"
|
||||
IsVisible="{Binding !IsDefault}"
|
||||
Command="{Binding $parent[ItemsControl].((vm:SettingsViewModel)DataContext).SetCatalogVersionAsDefaultCommand}"
|
||||
CommandParameter="{Binding}"/>
|
||||
<Button Grid.Column="5" Content="Löschen" FontSize="12" Padding="8,3"
|
||||
Command="{Binding $parent[ItemsControl].((vm:SettingsViewModel)DataContext).DeleteCatalogVersionCommand}"
|
||||
CommandParameter="{Binding}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
<Grid ColumnDefinitions="*,12,Auto">
|
||||
<TextBox Grid.Column="0" Text="{Binding NewVersionName}"
|
||||
PlaceholderText="Name der neuen Version (z.B. Bildungsplan 2026)"/>
|
||||
<Button Grid.Column="2" Content="Version anlegen" Command="{Binding AddCatalogVersionCommand}"/>
|
||||
</Grid>
|
||||
<TextBlock Text="{Binding VersionValidation}" Foreground="Red" FontSize="12"
|
||||
TextWrapping="Wrap"
|
||||
IsVisible="{Binding VersionValidation, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- Katalog-Validierungsmeldung -->
|
||||
<TextBlock Text="{Binding CatalogValidation}" Foreground="Red" FontSize="12"
|
||||
IsVisible="{Binding CatalogValidation, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
|
||||
|
||||
Reference in new issue
Block a user