diff --git a/messages/uniworx/de-de-formal.msg b/messages/uniworx/de-de-formal.msg index a1ece1c77..ae182100e 100644 --- a/messages/uniworx/de-de-formal.msg +++ b/messages/uniworx/de-de-formal.msg @@ -271,6 +271,7 @@ CourseLecturerEmail: E-Mail CourseLecturer: Dozent CourseAssistant: Assistent CourseLecturerAlreadyAdded: Dieser Nutzer ist bereits als Kursverwalter eingetragen +CourseVisibilityEndMustBeAfterStart: Ende des Sichtbarkeitszeitraums muss nach dem Anfang liegen CourseRegistrationEndMustBeAfterStart: Ende des Anmeldezeitraums muss nach dem Anfang liegen CourseDeregistrationEndMustBeAfterStart: Ende des Abmeldezeitraums muss nach dem Anfang des Anmeldezeitraums liegen CourseUserMustBeLecturer: Aktueller Benutzer muss als Kursverwalter eingetragen sein diff --git a/messages/uniworx/en-eu.msg b/messages/uniworx/en-eu.msg index ecb62a502..6a41d64b5 100644 --- a/messages/uniworx/en-eu.msg +++ b/messages/uniworx/en-eu.msg @@ -270,7 +270,8 @@ CourseLecturerEmail: Email CourseLecturer: Lecturer CourseAssistant: Assistant CourseLecturerAlreadyAdded: This user is already configured as a course administrator -CourseRegistrationEndMustBeAfterStart: The end of the registration period must be before its start +CourseVisibilityEndMustBeAfterStart: The end of the visibility period must be after its start +CourseRegistrationEndMustBeAfterStart: The end of the registration period must be after its start CourseDeregistrationEndMustBeAfterStart: The end of the deregistration period must be after the start of the registration period CourseUserMustBeLecturer: The current user needs to be a course administrator CourseAllocationRequiresCapacity: Course capacity needs to be specified if the course participates in a central allocation diff --git a/src/Handler/Course/Edit.hs b/src/Handler/Course/Edit.hs index fef09d719..6dde05c66 100644 --- a/src/Handler/Course/Edit.hs +++ b/src/Handler/Course/Edit.hs @@ -328,6 +328,8 @@ validateCourse = do | otherwise -> return Nothing + guardValidation MsgCourseVisibilityEndMustBeAfterStart + $ NTop cfVisFrom <= NTop cfVisTo guardValidation MsgCourseRegistrationEndMustBeAfterStart $ NTop cfRegFrom <= NTop cfRegTo guardValidation MsgCourseDeregistrationEndMustBeAfterStart