Gemeinsame Dokumentation für mehrere Beteiligte eines Vorgangs
CI / build-and-test (push) Canceled after 0s
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:
1 parent
e091b5c8de
commit
9a84bbaa38
23 files changed
+396
-49
No files matched your search
@@ -106,7 +106,7 @@ public partial class WebUntisDocumentationComparisonViewModel : ObservableObject
|
||||
// Nur nach Schüler*in+Datum erkannt, nicht nach Wortlaut: ein lokaler Eintrag von vor dieser
|
||||
// Funktion (oder frei formuliert) hat selten denselben Titel wie die WebUntis-Kategorie.
|
||||
List<Documentation> LocalDocsFor(Guid studentId, DateOnly date) =>
|
||||
localDocs.Where(d => d.StudentId == studentId && d.Date == date).ToList();
|
||||
localDocs.Where(d => d.Concerns(studentId) && d.Date == date).ToList();
|
||||
|
||||
foreach (var (entry, date) in ordered)
|
||||
{
|
||||
@@ -128,15 +128,20 @@ public partial class WebUntisDocumentationComparisonViewModel : ObservableObject
|
||||
});
|
||||
}
|
||||
|
||||
// WebUntis-Klassenbucheinträge sind personenbezogen — ein gemeinsamer lokaler Eintrag
|
||||
// (weitere Beteiligte) wird deshalb je beteiligter Person einzeln abgeglichen.
|
||||
foreach (var doc in localDocs)
|
||||
{
|
||||
if (doc.ExcludeFromWebUntisSync) continue;
|
||||
var coveredByReport = Rows.Any(r => r.AssignedStudent?.Id == doc.StudentId && r.Date == doc.Date);
|
||||
if (coveredByReport) continue;
|
||||
var student = ownStudents.FirstOrDefault(s => s.Id == doc.StudentId);
|
||||
if (student is null) continue;
|
||||
LocalOnlyRows.Add(new LocalOnlyDocumentationRow(student.FullName, doc.Date,
|
||||
doc.GroupId is { } groupId ? _groups.GetById(groupId)?.Name : null, doc.Title, doc.Content));
|
||||
foreach (var studentId in doc.InvolvedStudentIds())
|
||||
{
|
||||
var coveredByReport = Rows.Any(r => r.AssignedStudent?.Id == studentId && r.Date == doc.Date);
|
||||
if (coveredByReport) continue;
|
||||
var student = ownStudents.FirstOrDefault(s => s.Id == studentId);
|
||||
if (student is null) continue;
|
||||
LocalOnlyRows.Add(new LocalOnlyDocumentationRow(student.FullName, doc.Date,
|
||||
doc.GroupId is { } groupId ? _groups.GetById(groupId)?.Name : null, doc.Title, doc.Content));
|
||||
}
|
||||
}
|
||||
|
||||
var unresolved = Rows.Count(x => x.AssignedStudent is null);
|
||||
|
||||
Reference in new issue
Block a user