fix: handle rare cases where a mappingDescription with start>end would be produced
This commit is contained in:
parent
cd07a56a9f
commit
c99d96ecb8
@ -613,7 +613,11 @@ examAutoOccurrence (hash -> seed) rule ExamAutoOccurrenceConfig{..} occurrences
|
||||
_rule -> singleton $ head alphabet
|
||||
|
||||
mappingDescription :: Set ExamOccurrenceMappingDescription
|
||||
mappingDescription = Set.fromList $ ExamOccurrenceMappingRange (toNullable start) end : specialMapping
|
||||
mappingDescription
|
||||
-- if start > end, the room only consists of users with a non-ascii tag directly adjacent to the last room
|
||||
-- therefore, leave out a potentially confusing range description
|
||||
| toNullable start > end = Set.fromList specialMapping
|
||||
| otherwise = Set.fromList $ ExamOccurrenceMappingRange (toNullable start) end : specialMapping
|
||||
|
||||
specialMapping :: [ExamOccurrenceMappingDescription]
|
||||
specialMapping
|
||||
|
||||
Loading…
Reference in New Issue
Block a user