feat: add seating plans for learning groups

This commit is contained in:
2026-08-17 01:01:40 +02:00
parent fbf70df439
commit fe36f51886
19 changed files with 771 additions and 6 deletions
@@ -21,7 +21,8 @@ public class PersonalDataExportService(
IGradeRepository grades,
IExamResultRepository examResults,
IParticipationRepository participation,
IDocumentationRepository documentation)
IDocumentationRepository documentation,
ISeatingPlanRepository seatingPlans)
{
public string ExportAsJson(Guid studentId)
{
@@ -43,6 +44,18 @@ public class PersonalDataExportService(
Klausurergebnisse = examResults.GetByStudent(studentId),
Mitarbeit = participation.GetByStudent(studentId),
Dokumentation = documentation.GetByStudent(studentId),
Sitzplaetze = studentGroups
.SelectMany(g => seatingPlans.GetByGroup(g!.Id))
.SelectMany(plan => plan.Assignments
.Where(a => a.StudentId == studentId)
.Select(a => new
{
Sitzplan = plan.Name,
plan.Room,
Reihe = a.Row + 1,
Platz = a.Column + 1,
}))
.ToList(),
};
return JsonSerializer.Serialize(dto, new JsonSerializerOptions