fix(rooms): honor roomHidden
This commit is contained in:
parent
61c27d406c
commit
ed5d871182
@ -97,7 +97,9 @@ getCShowR tid ssh csh = do
|
|||||||
|
|
||||||
events' <- fmap (sortOn $ courseEventTime . entityVal . view _1) . lift . E.select . E.from $ \courseEvent -> do
|
events' <- fmap (sortOn $ courseEventTime . entityVal . view _1) . lift . E.select . E.from $ \courseEvent -> do
|
||||||
E.where_ $ courseEvent E.^. CourseEventCourse E.==. E.val cid
|
E.where_ $ courseEvent E.^. CourseEventCourse E.==. E.val cid
|
||||||
return (courseEvent, maybe E.false (flip showCourseEventRoom courseEvent . E.val) mbAid)
|
let showRoom = maybe E.false (flip showCourseEventRoom courseEvent . E.val) mbAid
|
||||||
|
E.||. E.not_ (courseEvent E.^. CourseEventRoomHidden)
|
||||||
|
return (courseEvent, showRoom)
|
||||||
events <- mapM (\(Entity evId ev, E.Value showRoom) -> (, ev, showRoom) <$> encrypt evId) events'
|
events <- mapM (\(Entity evId ev, E.Value showRoom) -> (, ev, showRoom) <$> encrypt evId) events'
|
||||||
|
|
||||||
hasSubmissionGroups <- lift . E.selectExists . E.from $ \(submissionGroupUser `E.InnerJoin` submissionGroup) -> do
|
hasSubmissionGroups <- lift . E.selectExists . E.from $ \(submissionGroupUser `E.InnerJoin` submissionGroup) -> do
|
||||||
@ -157,7 +159,9 @@ getCShowR tid ssh csh = do
|
|||||||
|
|
||||||
dbtSQLQuery tutorial = do
|
dbtSQLQuery tutorial = do
|
||||||
E.where_ $ tutorial E.^. TutorialCourse E.==. E.val cid
|
E.where_ $ tutorial E.^. TutorialCourse E.==. E.val cid
|
||||||
return (tutorial, maybe E.false (flip showTutorialRoom tutorial . E.val) mbAid)
|
let showRoom = maybe E.false (flip showTutorialRoom tutorial . E.val) mbAid
|
||||||
|
E.||. E.not_ (tutorial E.^. TutorialRoomHidden)
|
||||||
|
return (tutorial, )
|
||||||
dbtRowKey = (E.^. TutorialId)
|
dbtRowKey = (E.^. TutorialId)
|
||||||
dbtProj = traverse $ return . over _2 E.unValue
|
dbtProj = traverse $ return . over _2 E.unValue
|
||||||
dbtColonnade = dbColonnade $ mconcat
|
dbtColonnade = dbColonnade $ mconcat
|
||||||
|
|||||||
@ -65,8 +65,10 @@ getEShowR tid ssh csh examn = do
|
|||||||
= E.subSelectCount . E.from $ \examRegistration ->
|
= E.subSelectCount . E.from $ \examRegistration ->
|
||||||
E.where_ $ examRegistration E.^. ExamRegistrationExam E.==. E.val eId
|
E.where_ $ examRegistration E.^. ExamRegistrationExam E.==. E.val eId
|
||||||
E.&&. examRegistration E.^. ExamRegistrationOccurrence E.==. E.just (examOccurrence E.^. ExamOccurrenceId)
|
E.&&. examRegistration E.^. ExamRegistrationOccurrence E.==. E.just (examOccurrence E.^. ExamOccurrenceId)
|
||||||
|
showRoom = maybe E.false (flip showExamOccurrenceRoom examOccurrence . E.val) mUid
|
||||||
|
E.||. E.not_ (examOccurrence E.^. ExamOccurrenceRoomHidden)
|
||||||
E.orderBy [E.desc registered, E.asc $ examOccurrence E.^. ExamOccurrenceStart, E.asc $ examOccurrence E.^. ExamOccurrenceRoom]
|
E.orderBy [E.desc registered, E.asc $ examOccurrence E.^. ExamOccurrenceStart, E.asc $ examOccurrence E.^. ExamOccurrenceRoom]
|
||||||
return (examOccurrence, registered, registeredCount, maybe E.false (flip showExamOccurrenceRoom examOccurrence . E.val) mUid)
|
return (examOccurrence, registered, registeredCount, showRoom)
|
||||||
|
|
||||||
registeredCount <- fromIntegral <$> count [ ExamRegistrationExam ==. eId ]
|
registeredCount <- fromIntegral <$> count [ ExamRegistrationExam ==. eId ]
|
||||||
|
|
||||||
|
|||||||
@ -247,7 +247,9 @@ newsUpcomingExams uid = do
|
|||||||
E.&&. earliestOccurrence E.<=. E.just (E.val fortnight)
|
E.&&. earliestOccurrence E.<=. E.just (E.val fortnight)
|
||||||
-- E.&&. earliestOccurrence E.>=. E.just (E.val now)
|
-- E.&&. earliestOccurrence E.>=. E.just (E.val now)
|
||||||
E.where_ $ regToWithinFortnight E.||. startExamFortnight E.||. startOccurFortnight E.||. startEarliest
|
E.where_ $ regToWithinFortnight E.||. startExamFortnight E.||. startOccurFortnight E.||. startEarliest
|
||||||
return (course, exam, register, occurrence, showExamOccurrenceRoom (E.val uid) occurrence)
|
let showRoom = showExamOccurrenceRoom (E.val uid) examOccurrence
|
||||||
|
E.||. E.not_ (examOccurrence E.^. ExamOccurrenceRoomHidden)
|
||||||
|
return (course, exam, register, occurrence, showRoom)
|
||||||
dbtRowKey = queryExam >>> (E.^. ExamId)
|
dbtRowKey = queryExam >>> (E.^. ExamId)
|
||||||
dbtProj = return
|
dbtProj = return
|
||||||
dbtColonnade = dbColonnade $ mconcat
|
dbtColonnade = dbColonnade $ mconcat
|
||||||
|
|||||||
@ -34,7 +34,9 @@ getCTutorialListR tid ssh csh = do
|
|||||||
let participants :: E.SqlExpr (E.Value Int)
|
let participants :: E.SqlExpr (E.Value Int)
|
||||||
participants = E.subSelectCount . E.from $ \tutorialParticipant ->
|
participants = E.subSelectCount . E.from $ \tutorialParticipant ->
|
||||||
E.where_ $ tutorialParticipant E.^. TutorialParticipantTutorial E.==. tutorial E.^. TutorialId
|
E.where_ $ tutorialParticipant E.^. TutorialParticipantTutorial E.==. tutorial E.^. TutorialId
|
||||||
return (tutorial, participants, maybe E.false (flip showTutorialRoom tutorial . E.val) muid)
|
let showRoom = maybe E.false (flip showTutorialRoom tutorial . E.val) muid
|
||||||
|
E.||. E.not_ (tutorial E.^. TutorialRoomHidden)
|
||||||
|
return (tutorial, participants, showRoom)
|
||||||
dbtRowKey = (E.^. TutorialId)
|
dbtRowKey = (E.^. TutorialId)
|
||||||
dbtProj = return . over (_dbrOutput . _2) E.unValue . over (_dbrOutput . _3) E.unValue
|
dbtProj = return . over (_dbrOutput . _2) E.unValue . over (_dbrOutput . _3) E.unValue
|
||||||
dbtColonnade = dbColonnade $ mconcat
|
dbtColonnade = dbColonnade $ mconcat
|
||||||
|
|||||||
@ -40,6 +40,7 @@ classifyChangelogItem = \case
|
|||||||
ChangelogAllocationCourseAcceptSubstitutesFixed -> ChangelogItemBugfix
|
ChangelogAllocationCourseAcceptSubstitutesFixed -> ChangelogItemBugfix
|
||||||
ChangelogStoredMarkup -> ChangelogItemBugfix
|
ChangelogStoredMarkup -> ChangelogItemBugfix
|
||||||
ChangelogFixPersonalisedSheetFilesKeep -> ChangelogItemBugfix
|
ChangelogFixPersonalisedSheetFilesKeep -> ChangelogItemBugfix
|
||||||
|
ChangelogHonorRoomHidden -> ChangelogItemBugfix
|
||||||
_other -> ChangelogItemFeature
|
_other -> ChangelogItemFeature
|
||||||
|
|
||||||
changelogItemDays :: Map ChangelogItem Day
|
changelogItemDays :: Map ChangelogItem Day
|
||||||
|
|||||||
@ -0,0 +1,2 @@
|
|||||||
|
$newline never
|
||||||
|
„Raum nur für Teilnehmer“ u.Ä. wird nun korrekt beachtet.
|
||||||
2
templates/i18n/changelog/honor-room-hidden.en-eu.hamlet
Normal file
2
templates/i18n/changelog/honor-room-hidden.en-eu.hamlet
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
$newline never
|
||||||
|
“Room only for participants” and similiar settings are now honored.
|
||||||
Reference in New Issue
Block a user