From cd07a56a9fd3ee99b74e5304581574671e3689a0 Mon Sep 17 00:00:00 2001 From: Wolfgang Witt Date: Thu, 25 Feb 2021 23:26:33 +0100 Subject: [PATCH] fix: correctly calculate maximum user name length --- src/Handler/Utils/Exam.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Handler/Utils/Exam.hs b/src/Handler/Utils/Exam.hs index b54ac379c..3d0068735 100644 --- a/src/Handler/Utils/Exam.hs +++ b/src/Handler/Utils/Exam.hs @@ -565,7 +565,7 @@ examAutoOccurrence (hash -> seed) rule ExamAutoOccurrenceConfig{..} occurrences postprocess result = seq resultAscList (resultAscList, resultUsers) where maxTagLength :: Int - maxTagLength = maybe 0 maximum $ fromNullable $ map (length . snd) result + maxTagLength = maybe 0 maximum $ fromNullable $ concatMap (map length . snd) result rangeAlphabet :: [CI Char] rangeAlphabet = case rule of