From ac86832b34a605e5d64d56ef08a871bf307347a8 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Sat, 19 Jun 2021 10:17:42 +0200 Subject: [PATCH] fix(exams): correctly treat school-mode optional as off by default --- src/Handler/Exam/Form.hs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Handler/Exam/Form.hs b/src/Handler/Exam/Form.hs index ec8136171..ee463f11a 100644 --- a/src/Handler/Exam/Form.hs +++ b/src/Handler/Exam/Form.hs @@ -163,10 +163,9 @@ examForm (Entity _ Course{..}) template csrf = hoist liftHandler $ do SchoolAuthorshipStatementModeNone -> pure Nothing -- suppress display of whole section incl. header otherMode -> aformSection MsgExamAuthorshipStatementSection *> case otherMode of - SchoolAuthorshipStatementModeOptional -> optionalActionA - (contentField id) + SchoolAuthorshipStatementModeOptional -> optionalActionA (contentField id) (fslI MsgExamAuthorshipStatementRequired & setTooltip MsgExamAuthorshipStatementRequiredTip) - ((is _Just . efAuthorshipStatement <$> template) <|> (pure $ is _Just schoolSheetExamAuthorshipStatementDefinition)) + (is _Just . efAuthorshipStatement <$> template) SchoolAuthorshipStatementModeRequired -> fmap Just . contentField $ setTooltip MsgExamAuthorshipStatementRequiredDisabledOnTip _none -> pure Nothing