diff --git a/src/Handler/Course/Show.hs b/src/Handler/Course/Show.hs index 03be86723..5e446f648 100644 --- a/src/Handler/Course/Show.hs +++ b/src/Handler/Course/Show.hs @@ -217,6 +217,8 @@ getCShowR tid ssh csh = do , all (notElem pathSeparator . view _2) fs ] hiddenEventNotes = all (\(_,CourseEvent{..}) -> is _Nothing courseEventNote) events + courseVisFrom = courseVisibleFrom course + courseVisTo = courseVisibleTo course mayCreateNews <- hasWriteAccessTo $ CourseR tid ssh csh CNewsNewR mayCreateEvents <- hasWriteAccessTo $ CourseR tid ssh csh CEventsNewR mayEditCourse <- hasWriteAccessTo $ CourseR tid ssh csh CEditR diff --git a/templates/course.hamlet b/templates/course.hamlet index da5dedc5b..e0f8e3269 100644 --- a/templates/course.hamlet +++ b/templates/course.hamlet @@ -127,16 +127,16 @@ $# $if NTop (Just 0) < NTop (courseCapacity course) $if mayEditCourse
- ^{formatTimeRangeW SelFormatDateTime visFrom (courseVisibleTo course)} - $nothing - _{MsgCourseInvisible} +
+ $maybe visFrom <- courseVisFrom + ^{formatTimeRangeW SelFormatDateTime visFrom courseVisTo} + $nothing + _{MsgCourseInvisible} $maybe (Allocation{allocationName, allocationRegisterByCourse}, url) <- mAllocation'