Apply 1 suggestion(s) to 1 file(s)
This commit is contained in:
parent
0baa3325c2
commit
ff19b4a98d
@ -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 :: UTCTime -> E.SqlExpr (Entity Course) -> Maybe (E.SqlExpr (E.Value AllocationId)) -> E.SqlExpr (E.Value Bool)
|
||||||
courseIsVisible now course maid =
|
courseIsVisible now course maid =
|
||||||
(E.maybe E.false (\visibleFrom -> visibleFrom E.<=. E.val now) (course E.^. CourseVisibleFrom)
|
(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
|
) E.||. courseAllocationRegistrationOpen now (course E.^. CourseId) maid
|
||||||
|
|
||||||
courseIsVisible' :: UTCTime -> Entity Course -> Maybe AllocationId -> E.SqlExpr (E.Value Bool)
|
courseIsVisible' :: UTCTime -> Entity Course -> Maybe AllocationId -> E.SqlExpr (E.Value Bool)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user