From 97892993b259640be6e5d2fe043c4f8c6a78b405 Mon Sep 17 00:00:00 2001 From: Bernhard Liebl Date: Tue, 15 Jan 2019 11:39:29 +0100 Subject: [PATCH] Prevents illegal save on consecutive submits with invalid entries. --- Modules/Test/classes/class.ilTestPlayerAbstractGUI.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Modules/Test/classes/class.ilTestPlayerAbstractGUI.php b/Modules/Test/classes/class.ilTestPlayerAbstractGUI.php index 0eca9dc7d22b..63f61fe5f26d 100755 --- a/Modules/Test/classes/class.ilTestPlayerAbstractGUI.php +++ b/Modules/Test/classes/class.ilTestPlayerAbstractGUI.php @@ -2897,7 +2897,8 @@ protected function populateQuestionEditControl($questionGUI) // set the initial state of the question $state = $questionGUI->object->lookupForExistingSolutions($this->testSession->getActiveId(), $this->testSession->getPass()); $config['isAnswered'] = $state['authorized']; - $config['isAnswerChanged'] = $state['intermediate'] || $this->getAnswerChangedParameter(); + $hadSaveError = isset($_GET['save_error']) && $_GET['save_error'] == 1; + $config['isAnswerChanged'] = $state['intermediate'] || $this->getAnswerChangedParameter() || $hadSaveError; // set url to which the for should be submitted when the working time is over // don't use asynch url because the form is submitted directly