diff --git a/src/Utils/Course.hs b/src/Utils/Course.hs index e378500eb..79ed0d6c8 100644 --- a/src/Utils/Course.hs +++ b/src/Utils/Course.hs @@ -122,7 +122,7 @@ isCourseAssociated muid ata cid maid = courseIsVisible :: UTCTime -> E.SqlExpr (Entity Course) -> Maybe (E.SqlExpr (E.Value AllocationId)) -> E.SqlExpr (E.Value Bool) courseIsVisible now course maid = (E.maybe E.false (\visibleFrom -> visibleFrom E.<=. E.val now) (course E.^. CourseVisibleFrom) - E.&&. E.maybe (E.val True) (\visibleTo -> E.val now E.<=. visibleTo) (course E.^. CourseVisibleTo) + E.&&. E.maybe E.true (\visibleTo -> E.val now E.<=. visibleTo) (course E.^. CourseVisibleTo) ) E.||. courseAllocationRegistrationOpen now (course E.^. CourseId) maid courseIsVisible' :: UTCTime -> Entity Course -> Maybe AllocationId -> E.SqlExpr (E.Value Bool)