added guardian letters with chat and multiple answer functionalities

This commit is contained in:
2026-09-20 16:12:45 +02:00
parent 67c935c05b
commit 2423c1a75e
68 changed files with 8348 additions and 226 deletions
+12 -5
View File
@@ -29,9 +29,15 @@ void main() {
final effective = AppModule.effectiveModuleOrder(settingsWith(custom));
// parentLetters and ticker are both missing and follow timetable in the
// declared order, so they line up behind it.
expect(
effective.indexOf(Modules.parentLetters),
effective.indexOf(Modules.timetable) + 1,
);
expect(
effective.indexOf(Modules.ticker),
effective.indexOf(Modules.timetable) + 1,
effective.indexOf(Modules.parentLetters) + 1,
);
expect(effective.toSet(), Modules.values.toSet());
});
@@ -94,10 +100,11 @@ void main() {
final student = CredentialSession(username: 'max', password: 'pw');
const guardian = GuardianSession(email: 'e@x.de');
test('password accounts see every module', () {
for (final m in Modules.values) {
expect(AppModule.isAvailableFor(m, student), isTrue, reason: m.name);
}
test('password accounts see every module but the guardian ones', () {
final hidden = Modules.values
.where((m) => !AppModule.isAvailableFor(m, student))
.toSet();
expect(hidden, {Modules.parentLetters});
});
test('guardians lose exactly the Nextcloud modules', () {