feat(course-visibility): error on visibleFrom > visibleTo

This commit is contained in:
Sarah Vaupel 2020-08-10 13:55:00 +02:00
parent 6a0774bff3
commit 9494019694
3 changed files with 5 additions and 1 deletions

View File

@ -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

View File

@ -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

View File

@ -328,6 +328,8 @@ validateCourse = do
| otherwise
-> return Nothing
guardValidation MsgCourseVisibilityEndMustBeAfterStart
$ NTop cfVisFrom <= NTop cfVisTo
guardValidation MsgCourseRegistrationEndMustBeAfterStart
$ NTop cfRegFrom <= NTop cfRegTo
guardValidation MsgCourseDeregistrationEndMustBeAfterStart