From 23aca1caa43f24b38aa22d3cac3f2289b1cbe8f3 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel <> Date: Mon, 3 Aug 2020 10:37:09 +0200 Subject: [PATCH] feat(course-visibility): warn on invisibility during registration --- messages/uniworx/de-de-formal.msg | 1 + messages/uniworx/en-eu.msg | 1 + src/Handler/Course/Edit.hs | 2 ++ 3 files changed, 4 insertions(+) diff --git a/messages/uniworx/de-de-formal.msg b/messages/uniworx/de-de-formal.msg index e9c42b127..c3f54382b 100644 --- a/messages/uniworx/de-de-formal.msg +++ b/messages/uniworx/de-de-formal.msg @@ -277,6 +277,7 @@ CourseAllocationRequiresCapacity: Bei Teilnahme an einer Zentralanmeldung muss e CourseAllocationTermMustMatch: Kurs-Semester muss mit Semester der Zentralanmeldung übereinstimmen CourseAllocationCapacityMayNotBeChanged: Kapazität eines Kurses, der an einer Zentralanmeldung teilnimmt, darf nicht nachträglich verändert werden CourseShorthandTooLong: Lange Kurskürzel können zu Problemen bei der Darstellung und der Kommunikation mit den Studierenden führen. Bitte wählen Sie ein weniger langes Kürzel, falls möglich. +CourseNotAlwaysVisibleDuringRegistration: Um Studierenden über den gesamten Anmeldezeitraum hinweg die Anmeldung zum Kurs zu ermöglichen, sollte der Kurs auch über den gesamten Anmeldezeitraum hinweg sichtbar sein (dies ist aktuell nicht gegeben). CourseLecturerRightsIdentical: Alle Sorten von Kursverwalter haben identische Rechte. diff --git a/messages/uniworx/en-eu.msg b/messages/uniworx/en-eu.msg index 86cd8aa19..f3152fdf8 100644 --- a/messages/uniworx/en-eu.msg +++ b/messages/uniworx/en-eu.msg @@ -276,6 +276,7 @@ CourseAllocationRequiresCapacity: Course capacity needs to be specified if the c CourseAllocationTermMustMatch: Course semester needs to match the semester of the central allocation CourseAllocationCapacityMayNotBeChanged: The capacity of a course that participates in a central allocation must not be altered CourseShorthandTooLong: Long course shorthands may lead to display issues and might complicate communication with students. Please choose a more concise shorthand if possible. +CourseNotAlwaysVisibleDuringRegistration: To allow for students to register during the entire registration period, the course should also be visible during the entire registration period (which is currently not the case). CourseLecturerRightsIdentical: All sorts of course administrators have the same permissions. diff --git a/src/Handler/Course/Edit.hs b/src/Handler/Course/Edit.hs index 4b0fa3107..55e025adb 100644 --- a/src/Handler/Course/Edit.hs +++ b/src/Handler/Course/Edit.hs @@ -343,6 +343,8 @@ validateCourse = do warnValidation MsgCourseShorthandTooLong $ length (CI.original cfShort) <= 10 + warnValidation MsgCourseNotAlwaysVisibleDuringRegistration + $ NTop cfVisFrom <= NTop cfRegFrom && NTop cfRegTo <= NTop cfVisTo getCourseNewR :: Handler Html -- call via toTextUrl