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>
114 lines
6.2 KiB
XML
114 lines
6.2 KiB
XML
<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.AddGroupDialog"
|
||
x:DataType="vm:AddGroupDialogViewModel"
|
||
Title="{Binding DialogTitle}"
|
||
Width="420" SizeToContent="Height"
|
||
CanResize="False" WindowStartupLocation="CenterOwner">
|
||
|
||
<Grid RowDefinitions="*,Auto" Margin="24">
|
||
<StackPanel Grid.Row="0" Spacing="14">
|
||
<TextBlock Text="{Binding DialogTitle}" Classes="dialogtitle"/>
|
||
|
||
<!-- Typ: Klasse oder Kurs -->
|
||
<StackPanel Spacing="4">
|
||
<TextBlock Text="Typ *" FontSize="12" Opacity="0.7"/>
|
||
<ComboBox ItemsSource="{Binding TypeOptions}"
|
||
SelectedItem="{Binding SelectedTypeName}"
|
||
HorizontalAlignment="Stretch"/>
|
||
</StackPanel>
|
||
|
||
<!-- Bezeichnung – Label und Placeholder reagieren auf den Typ -->
|
||
<StackPanel Spacing="4">
|
||
<TextBlock Text="{Binding NameLabel}" FontSize="12" Opacity="0.7"/>
|
||
<TextBox Text="{Binding Name}" PlaceholderText="{Binding NameHint}"/>
|
||
<TextBlock Text="{Binding NameError}" Foreground="Red" FontSize="11"
|
||
IsVisible="{Binding NameError, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
|
||
</StackPanel>
|
||
|
||
<!-- Fach – AutoComplete aus bekannten Fächern; auch bei Klasse, da eine
|
||
Lerngruppe genau ein Fach unterrichtet (bei zwei Fächern: zwei Gruppen anlegen) -->
|
||
<StackPanel Spacing="4">
|
||
<TextBlock Text="Fach (optional)" FontSize="12" Opacity="0.7"/>
|
||
<AutoCompleteBox Text="{Binding Subject}"
|
||
ItemsSource="{Binding KnownSubjectNames}"
|
||
FilterMode="Contains"
|
||
MinimumPrefixLength="0"
|
||
PlaceholderText="z.B. Chemie, Mathematik"
|
||
HorizontalAlignment="Stretch"/>
|
||
</StackPanel>
|
||
|
||
<!-- Bildungsplan-Version: nur sichtbar, wenn das Fach bereits existiert und mehr als eine
|
||
Version hat (neue Bildungspläne wachsen klassenstufenweise hoch, siehe Settings/Kompetenzen) -->
|
||
<StackPanel Spacing="4" IsVisible="{Binding HasCompetencyVersionChoice}">
|
||
<TextBlock Text="Bildungsplan-Version" FontSize="12" Opacity="0.7"/>
|
||
<ComboBox ItemsSource="{Binding AvailableCompetencyVersions}"
|
||
SelectedItem="{Binding SelectedCompetencyVersion}"
|
||
HorizontalAlignment="Stretch">
|
||
<ComboBox.ItemTemplate>
|
||
<DataTemplate DataType="vm:CompetencyVersionListItem">
|
||
<TextBlock Text="{Binding DisplayName}"/>
|
||
</DataTemplate>
|
||
</ComboBox.ItemTemplate>
|
||
</ComboBox>
|
||
</StackPanel>
|
||
|
||
<Grid ColumnDefinitions="*,12,*">
|
||
<StackPanel Grid.Column="0" Spacing="4">
|
||
<TextBlock Text="Klassenstufe *" FontSize="12" Opacity="0.7"/>
|
||
<NumericUpDown Value="{Binding GradeLevel}" Minimum="1" Maximum="13" FormatString="0"/>
|
||
<TextBlock Text="{Binding GradeLevelError}" Foreground="Red" FontSize="11"
|
||
IsVisible="{Binding GradeLevelError, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
|
||
</StackPanel>
|
||
<StackPanel Grid.Column="2" Spacing="4">
|
||
<TextBlock Text="Schuljahr" FontSize="12" Opacity="0.7"/>
|
||
<ComboBox ItemsSource="{Binding SchoolYears}"
|
||
SelectedItem="{Binding SelectedSchoolYear}"
|
||
HorizontalAlignment="Stretch"/>
|
||
</StackPanel>
|
||
</Grid>
|
||
|
||
<Grid ColumnDefinitions="*,12,*">
|
||
<StackPanel Grid.Column="0" Spacing="4">
|
||
<TextBlock Text="Bewertungssystem" FontSize="12" Opacity="0.7"/>
|
||
<ComboBox ItemsSource="{Binding GradingOptions}"
|
||
SelectedItem="{Binding SelectedGradingName}"
|
||
HorizontalAlignment="Stretch"/>
|
||
</StackPanel>
|
||
<StackPanel Grid.Column="2" Spacing="4">
|
||
<TextBlock Text="Wochenstunden (optional)" FontSize="12" Opacity="0.7"/>
|
||
<NumericUpDown Value="{Binding HoursPerWeek}" Minimum="1" Maximum="40" FormatString="0"
|
||
HorizontalAlignment="Stretch"/>
|
||
</StackPanel>
|
||
</Grid>
|
||
|
||
<CheckBox Content="Gehört zu meiner Klasse" IsChecked="{Binding IsOwnClass}"
|
||
ToolTip.Tip="Für die farbliche Hervorhebung im Dashboard-Kalender. Mehrere Gruppen (Klasse + zugehörige Kurse) können markiert werden."/>
|
||
|
||
<CheckBox Content="Niveaudifferenzierung (E/G/Förder)" IsChecked="{Binding IsDifferentiated}"
|
||
ToolTip.Tip="Blendet im Schüler-Tab eine Niveau-Zuordnung je Schüler ein und erlaubt in Klausuren die Zuordnung zu einem Niveau."/>
|
||
|
||
<CheckBox Content="Benötigt Unterrichtsplanung" IsChecked="{Binding RequiresLessonPlanning}"
|
||
ToolTip.Tip="Deaktivieren für Gruppen ohne inhaltlichen Verlaufsplan (z.B. Klassenrat, Willkommenskreis) - blendet für diese Gruppe die Dashboard-Erinnerung "Ungeplante Stunden" aus."/>
|
||
|
||
<StackPanel Spacing="4">
|
||
<TextBlock Text="WebUntis-Unterrichtsnummer (optional)" FontSize="12" Opacity="0.7"/>
|
||
<NumericUpDown Value="{Binding WebUntisLessonId}" Minimum="1" FormatString="0"
|
||
HorizontalAlignment="Stretch"
|
||
ToolTip.Tip="lsid aus WebUntis (Unterricht -> Mein Unterricht -> Berichte-Symbol der Zeile). Wird von WebUntis pro Schuljahr neu vergeben und muss deshalb jedes Schuljahr aktualisiert werden."/>
|
||
</StackPanel>
|
||
|
||
<CheckBox Content="Nicht im Untis-Hub verfolgen" IsChecked="{Binding ExcludedFromUntisHub}"
|
||
ToolTip.Tip="Blendet diese Gruppe im Untis-Hub aus (keine Fälligkeits-Erinnerungen für Fehlzeiten/Abgleiche), auch wenn eine WebUntis-Unterrichtsnummer hinterlegt ist - z.B. für Klassenrat oder AGs."/>
|
||
|
||
</StackPanel>
|
||
|
||
<Grid Grid.Row="1" ColumnDefinitions="*,8,*" Margin="0,20,0,0">
|
||
<Button Grid.Column="0" Content="Abbrechen" HorizontalAlignment="Stretch" Click="OnCancel"/>
|
||
<Button Grid.Column="2" Content="{Binding SaveButtonText}"
|
||
HorizontalAlignment="Stretch" Click="OnSave"/>
|
||
</Grid>
|
||
</Grid>
|
||
</Window>
|