From fe78377fae8af7766f9720628aebef599656ed2f Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 11 Jun 2021 12:28:23 +0200 Subject: [PATCH] fix(exams): better behaviour for optional statements wrt school default --- src/Handler/Exam/Form.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Handler/Exam/Form.hs b/src/Handler/Exam/Form.hs index 41c003cab..9deb02102 100644 --- a/src/Handler/Exam/Form.hs +++ b/src/Handler/Exam/Form.hs @@ -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 )