fix: check space of occurrences after ignoring

This commit is contained in:
Wolfgang Witt 2021-03-18 14:51:50 +01:00 committed by Gregor Kleen
parent 11664dcd82
commit fabf56c164

View File

@ -45,6 +45,7 @@ import qualified Data.Array as Array
import Data.Array.ST (STArray, STUArray)
import qualified Data.Array.ST as ST
import Data.Foldable (foldMap')
import Data.List (findIndex, unfoldr)
import qualified Data.List as List
@ -392,7 +393,7 @@ examAutoOccurrence (hash -> seed) rule ExamAutoOccurrenceConfig{..} occurrences
| otherwise -> Map.singleton [] $ Map.keysSet users
occurrencesSize :: ExamOccurrenceCapacity
occurrencesSize = fold occurrences'
occurrencesSize = foldMap' (view _2) occurrences''
occurrences' :: Map ExamOccurrenceId ExamOccurrenceCapacity
-- ^ reduce room capacity for every pre-assigned user by 1