From 358b28eeac3ff417d931b46c999ecdefc1970e6a Mon Sep 17 00:00:00 2001 From: fmi Date: Wed, 22 Jul 2026 11:22:19 +0200 Subject: [PATCH] refuse if nothing prefilled --- flex/resResolveFlex.flex | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/flex/resResolveFlex.flex b/flex/resResolveFlex.flex index e21e35c0..fd568023 100644 --- a/flex/resResolveFlex.flex +++ b/flex/resResolveFlex.flex @@ -19,7 +19,7 @@ type TaskData = ResolutionInst module TaskSettings where import LogicTasks.Config (dResConf, ResolutionConfig(..)) -import Control.OutputCapable.Blocks (LangM, OutputCapable) +import Control.OutputCapable.Blocks import LogicTasks.Semantics.Resolve (verifyQuiz) @@ -30,8 +30,14 @@ resConf :: ResolutionConfig resConf = dResConf validateSettings :: OutputCapable m => LangM m -validateSettings = verifyQuiz resConf - +validateSettings + | isNotPrefilled prefillSelect = + refuse $ indent $ translate $ do + german "Es ist nichts vorausgefüllt!" + english "Nothing is prefilled!" + | otherwise = verifyQuiz resConf + where + isNotPrefilled (a,b,c) = not (a || b || c) =============================================