diff --git a/src/Handler/Exam/AutoOccurrence.hs b/src/Handler/Exam/AutoOccurrence.hs index b4ee68dd5..e0388dc95 100644 --- a/src/Handler/Exam/AutoOccurrence.hs +++ b/src/Handler/Exam/AutoOccurrence.hs @@ -62,7 +62,7 @@ examAutoOccurrenceCalculateForm ExamAutoOccurrenceCalculateForm{ eaofConfig } automaticIfTrue False = EAOIRManual Set.empty ignoreRooms :: ExamAutoOccurrenceIgnoreRooms -> Bool ignoreRooms EAOIRAutomatic = True - ignoreRooms (EAOIRManual s) = null s + ignoreRooms (EAOIRManual s) = not $ null s examAutoOccurrenceNudgeForm :: ExamOccurrenceId -> Maybe ExamAutoOccurrenceCalculateForm -> Form ExamAutoOccurrenceCalculateForm examAutoOccurrenceNudgeForm occId protoForm html = do diff --git a/src/Handler/Utils/Exam.hs b/src/Handler/Utils/Exam.hs index e8f8c6b1c..2000aeb25 100644 --- a/src/Handler/Utils/Exam.hs +++ b/src/Handler/Utils/Exam.hs @@ -413,7 +413,7 @@ examAutoOccurrence (hash -> seed) rule ExamAutoOccurrenceConfig{..} occurrences -- If a single occurrence can accommodate all participants, pick the one with -- the least capacity (occurrences'', ignoredOccurrences) = case eaocIgnoreRooms of - (EAOIRManual manuallyIgnored) -> (Map.toList $ Map.restrictKeys occurrences' manuallyIgnored, manuallyIgnored) + (EAOIRManual manuallyIgnored) -> (Map.toList $ Map.withoutKeys occurrences' manuallyIgnored, manuallyIgnored) EAOIRAutomatic -- effect of ticked minimizeRooms Checkbox | Just largeEnoughs <- fromNullable . filter ((>= Restricted usersCount) . view _2) $ Map.toList occurrences' -> let pickedLargeEnough = minimumBy (comparing $ view _2) largeEnoughs