fix(exams): better behaviour for optional statements wrt school default

This commit is contained in:
Sarah Vaupel 2021-06-11 12:28:23 +02:00 committed by Gregor Kleen
parent 0082135c56
commit fe78377fae

View File

@ -168,7 +168,7 @@ examForm (Entity _ Course{..}) template csrf = hoist liftHandler $ do
)
( case schoolSheetExamAuthorshipStatementMode of
SchoolAuthorshipStatementModeNone -> Just False
SchoolAuthorshipStatementModeOptional -> is _Just . efAuthorshipStatement <$> template
SchoolAuthorshipStatementModeOptional -> (is _Just . efAuthorshipStatement <$> template) <|> (pure $ is _Just schoolSheetExamAuthorshipStatementDefinition)
SchoolAuthorshipStatementModeRequired -> Just True
)