Files
LehrerApp/LehrerApp.Desktop/Views/Groups/ParticipationTabView.axaml
T
admin 182c386cc5 Mitarbeitsnote-Aggregation (3.2)
Neuer Dialog berechnet aus den Sitzungs-Bewertungen je Schüler eine
Mitarbeitsnote (H1/H2/Gesamtjahr), mit editierbarer Aspekt-Gewichtung,
Trendanzeige und Übernahme als Grade (Category=Participation).
2026-08-12 14:10:04 +02:00

112 lines
5.0 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.
<UserControl 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.ParticipationTabView"
x:DataType="vm:ParticipationTabViewModel">
<Grid ColumnDefinitions="220,*">
<!-- Linke Seite: Sitzungsliste -->
<Border Grid.Column="0"
BorderBrush="{DynamicResource SystemControlForegroundBaseLowBrush}"
BorderThickness="0,0,1,0">
<Grid RowDefinitions="Auto,Auto,*">
<StackPanel Grid.Row="0" Orientation="Horizontal" Spacing="6" Margin="10,10,10,6">
<Button Content=" Sitzung" Command="{Binding AddSessionCommand}" HorizontalAlignment="Stretch"/>
<Button Content="Schnell" Command="{Binding QuickInputCommand}"/>
</StackPanel>
<Button Grid.Row="1" Content="Ø Mitarbeitsnote" Command="{Binding ComputeGradeCommand}"
HorizontalAlignment="Stretch" Margin="10,0,10,6"/>
<ListBox Grid.Row="2"
ItemsSource="{Binding Sessions}"
SelectedItem="{Binding SelectedSession}"
BorderThickness="0">
<ListBox.ItemTemplate>
<DataTemplate x:DataType="vm:ParticipationSessionItem">
<TextBlock Text="{Binding Display}" TextWrapping="Wrap" Padding="4,3" FontSize="12"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
</Border>
<!-- Rechte Seite -->
<Grid Grid.Column="1" RowDefinitions="Auto,Auto,*">
<!-- Header: Session-Titel + Toggle-Buttons -->
<Grid Grid.Row="0" ColumnDefinitions="*,Auto" Margin="12,8,12,4"
IsVisible="{Binding SelectedSession, Converter={x:Static ObjectConverters.IsNotNull}}">
<TextBlock Grid.Column="0"
Text="{Binding SelectedSessionDisplay}"
FontSize="13" FontWeight="SemiBold"
VerticalAlignment="Center"/>
<StackPanel Grid.Column="1" Orientation="Horizontal" Spacing="6"
IsVisible="{Binding HasCompetencyCatalog}">
<ToggleButton Content="◇ Kompetenzen"
IsChecked="{Binding CompetencyTagsVisible}"
FontSize="11" Padding="8,3"/>
<ToggleButton Content="◈ Schüler-Ratings"
IsChecked="{Binding StudentCompetencyRatingsVisible}"
FontSize="11" Padding="8,3"/>
</StackPanel>
</Grid>
<!-- Kompetenz-Tag-Panel -->
<Border Grid.Row="1"
IsVisible="{Binding CompetencyTagsVisible}"
BorderBrush="{DynamicResource SystemControlForegroundBaseLowBrush}"
BorderThickness="0,0,0,1"
Padding="12,8">
<ScrollViewer HorizontalScrollBarVisibility="Disabled" MaxHeight="200">
<ItemsControl ItemsSource="{Binding CompetencyTagGroups}">
<ItemsControl.ItemTemplate>
<DataTemplate DataType="vm:CompetencyTagGroup">
<StackPanel Spacing="4" Margin="0,0,0,10">
<TextBlock Text="{Binding DisplayName}"
FontSize="11" FontWeight="SemiBold" Opacity="0.55"/>
<ItemsControl ItemsSource="{Binding Items}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate DataType="vm:CompetencyTag">
<ToggleButton IsChecked="{Binding IsSelected}"
Content="{Binding Display}"
FontSize="11"
Padding="6,3"
Margin="0,0,4,4"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
</Border>
<!-- DataGrid: Spalten werden in ParticipationTabView.axaml.cs dynamisch erzeugt -->
<DataGrid Grid.Row="2"
x:Name="RatingGrid"
ItemsSource="{Binding StudentRows}"
AutoGenerateColumns="False"
IsReadOnly="True"
GridLinesVisibility="All"
CanUserReorderColumns="False"
CanUserResizeColumns="True"
IsVisible="{Binding SelectedSession, Converter={x:Static ObjectConverters.IsNotNull}}"/>
<TextBlock Grid.Row="2"
Text="{Binding NoDataText}"
HorizontalAlignment="Center" VerticalAlignment="Center"
Opacity="0.35" FontSize="14"
IsVisible="{Binding SelectedSession, Converter={x:Static ObjectConverters.IsNull}}"/>
</Grid>
</Grid>
</UserControl>