Add animated classroom grouping with saved editable plans
CI / build-and-test (push) Canceled after 0s
CI / build-and-test (push) Canceled after 0s
This commit is contained in:
1 parent
d4b1419f9a
commit
f0462bd2a1
27 files changed
+775
-46
No files matched your search
@@ -22,7 +22,8 @@ public class PersonalDataExportService(
|
||||
IExamResultRepository examResults,
|
||||
IParticipationRepository participation,
|
||||
IDocumentationRepository documentation,
|
||||
ISeatingPlanRepository seatingPlans)
|
||||
ISeatingPlanRepository seatingPlans,
|
||||
IStudentGroupPlanRepository? studentGroupPlans = null)
|
||||
{
|
||||
public string ExportAsJson(Guid studentId)
|
||||
{
|
||||
@@ -56,6 +57,16 @@ public class PersonalDataExportService(
|
||||
Platz = a.Column + 1,
|
||||
}))
|
||||
.ToList(),
|
||||
GespeicherteGruppeneinteilungen = (studentGroupPlans?.GetByStudent(studentId) ?? [])
|
||||
.SelectMany(plan => plan.Groups.Select((subgroup, index) => new
|
||||
{
|
||||
Einteilung = plan.Name,
|
||||
Gruppe = index + 1,
|
||||
Enthalten = subgroup.StudentIds.Contains(studentId),
|
||||
}))
|
||||
.Where(entry => entry.Enthalten)
|
||||
.Select(entry => new { entry.Einteilung, entry.Gruppe })
|
||||
.ToList(),
|
||||
};
|
||||
|
||||
return JsonSerializer.Serialize(dto, new JsonSerializerOptions
|
||||
|
||||
Reference in new issue
Block a user