Gemeinsame Dokumentation für mehrere Beteiligte eines Vorgangs
CI / build-and-test (push) Canceled after 0s

Ein Dokumentationseintrag kann jetzt weitere Schüler*innen betreffen
(Documentation.AdditionalStudentIds, StudentId bleibt Hauptperson). Der
Eintrag existiert nur einmal, erscheint aber im Dokumentations-Tab jeder
beteiligten Person. Der Dokumentations-Dialog bietet in beiden
Vorgänge-Tabs "Betrifft außerdem" mit den Beteiligten des Vorgangs an.
Klassenlehrer-Listen, WebUntis-Abgleich, Löschfristen und
Referenzzählung berücksichtigen die weiteren Beteiligten.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
adminandClaude Opus 5.5 committed 2026-09-28 08:43:24 +02:00
1 parent e091b5c8de
commit 9a84bbaa38
23 files changed
+396 -49

No files matched your search

@@ -51,7 +51,8 @@ public partial class ClassTeacherCasesView : UserControl
}
private async Task<Documentation?> ShowDocumentationDialog(
Guid defaultStudentId, List<StudentOption> studentOptions, Documentation? editing)
Guid defaultStudentId, List<StudentOption> studentOptions, List<StudentOption> coStudentOptions,
Documentation? editing)
{
var owner = TopLevel.GetTopLevel(this) as Window;
if (owner is null) return null;
@@ -59,7 +60,8 @@ public partial class ClassTeacherCasesView : UserControl
var isNewDraft = editing is not null
&& (DataContext as ClassTeacherCasesViewModel)?.IsNewDocumentationDraft(editing) == true;
var vm = new DocumentationDialogViewModel(defaultStudentId, editing,
App.Services.GetRequiredService<IAttachmentStorage>(), studentOptions, isNewDraft: isNewDraft);
App.Services.GetRequiredService<IAttachmentStorage>(), studentOptions, isNewDraft: isNewDraft,
coStudentOptions: coStudentOptions);
var dialog = new DocumentationDialog { DataContext = vm };
var saved = await dialog.ShowDialog<bool>(owner);
if (!saved) vm.DiscardUnsavedAttachments();
@@ -21,6 +21,20 @@
IsVisible="{Binding StudentError, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
</StackPanel>
<StackPanel Spacing="4" IsVisible="{Binding HasCoStudents}">
<TextBlock Text="Betrifft außerdem" FontSize="12" Opacity="0.7"/>
<TextBlock Text="Der Eintrag wird nur einmal gespeichert, erscheint aber auch in der Dokumentation der hier angehakten Schüler*innen."
FontSize="11" Opacity="0.55" TextWrapping="Wrap"/>
<ItemsControl ItemsSource="{Binding CoStudents}">
<ItemsControl.ItemTemplate>
<DataTemplate x:DataType="vm:CoStudentChoice">
<CheckBox Content="{Binding Name}" IsChecked="{Binding IsSelected}"
IsVisible="{Binding !IsPrimary}"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
<Grid ColumnDefinitions="*,12,140">
<StackPanel Grid.Column="0" Spacing="4">
<TextBlock Text="Titel *" FontSize="12" Opacity="0.7"/>
@@ -299,6 +299,8 @@
<TextBlock Text="{Binding StatusLabel}" FontSize="11" Opacity="0.55"
IsVisible="{Binding StatusLabel, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
<TextBlock Text="📎 Anhang" FontSize="11" Opacity="0.55" IsVisible="{Binding HasAttachments}"/>
<TextBlock Text="{Binding SharedWith, StringFormat='👥 gemeinsam mit {0}'}" FontSize="11"
Opacity="0.55" TextWrapping="Wrap" IsVisible="{Binding IsShared}"/>
</StackPanel>
<ItemsControl ItemsSource="{Binding TagChips}" IsVisible="{Binding IsRevealed}">
<ItemsControl.ItemsPanel>
@@ -105,7 +105,8 @@ public partial class StudentDetailView : UserControl
var info = new ConfirmDialogInfo
{
Title = "Eintrag löschen?",
Message = $"\"{item.Model.Title}\" wird als gelöscht markiert und nicht mehr angezeigt.",
Message = $"\"{item.Model.Title}\" wird als gelöscht markiert und nicht mehr angezeigt." +
(item.IsShared ? $" Der Eintrag verschwindet auch bei {item.SharedWith}." : ""),
ConfirmText = "Löschen",
};
var dialog = new ConfirmDialog { DataContext = info };
@@ -52,7 +52,8 @@ public partial class StudentVorgaengeTabView : UserControl
return owner is not null && await dialog.ShowDialog<bool>(owner);
}
private async Task<Documentation?> ShowDocumentationDialog(Guid studentId, Documentation? editing)
private async Task<Documentation?> ShowDocumentationDialog(
Guid studentId, List<StudentOption> coStudentOptions, Documentation? editing)
{
var owner = TopLevel.GetTopLevel(this) as Window;
if (owner is null) return null;
@@ -60,7 +61,8 @@ public partial class StudentVorgaengeTabView : UserControl
var isNewDraft = editing is not null
&& (DataContext as StudentVorgaengeViewModel)?.IsNewDocumentationDraft(editing) == true;
var vm = new DocumentationDialogViewModel(studentId, editing,
App.Services.GetRequiredService<IAttachmentStorage>(), isNewDraft: isNewDraft);
App.Services.GetRequiredService<IAttachmentStorage>(), isNewDraft: isNewDraft,
coStudentOptions: coStudentOptions);
var dialog = new DocumentationDialog { DataContext = vm };
var saved = await dialog.ShowDialog<bool>(owner);
if (!saved) vm.DiscardUnsavedAttachments();