fix: check space of occurrences after ignoring
This commit is contained in:
parent
11664dcd82
commit
fabf56c164
@ -45,6 +45,7 @@ import qualified Data.Array as Array
|
|||||||
import Data.Array.ST (STArray, STUArray)
|
import Data.Array.ST (STArray, STUArray)
|
||||||
import qualified Data.Array.ST as ST
|
import qualified Data.Array.ST as ST
|
||||||
|
|
||||||
|
import Data.Foldable (foldMap')
|
||||||
import Data.List (findIndex, unfoldr)
|
import Data.List (findIndex, unfoldr)
|
||||||
import qualified Data.List as List
|
import qualified Data.List as List
|
||||||
|
|
||||||
@ -392,7 +393,7 @@ examAutoOccurrence (hash -> seed) rule ExamAutoOccurrenceConfig{..} occurrences
|
|||||||
| otherwise -> Map.singleton [] $ Map.keysSet users
|
| otherwise -> Map.singleton [] $ Map.keysSet users
|
||||||
|
|
||||||
occurrencesSize :: ExamOccurrenceCapacity
|
occurrencesSize :: ExamOccurrenceCapacity
|
||||||
occurrencesSize = fold occurrences'
|
occurrencesSize = foldMap' (view _2) occurrences''
|
||||||
|
|
||||||
occurrences' :: Map ExamOccurrenceId ExamOccurrenceCapacity
|
occurrences' :: Map ExamOccurrenceId ExamOccurrenceCapacity
|
||||||
-- ^ reduce room capacity for every pre-assigned user by 1
|
-- ^ reduce room capacity for every pre-assigned user by 1
|
||||||
|
|||||||
Reference in New Issue
Block a user