From eaba449198c7aeb73de9ecacdc804d37162d19eb Mon Sep 17 00:00:00 2001 From: Angel Fernando Quiroz Campos Date: Sun, 2 Aug 2020 13:53:00 -0500 Subject: [PATCH] Quiz: Save question when time ending - refs BT#17599 #3044 --- main/exercise/exercise.class.php | 3 +++ main/exercise/exercise_submit.php | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/main/exercise/exercise.class.php b/main/exercise/exercise.class.php index 365ab440b8..dc5ebae1ab 100755 --- a/main/exercise/exercise.class.php +++ b/main/exercise/exercise.class.php @@ -3422,6 +3422,9 @@ class Exercise $script = 'redirectExerciseToResult();'; if (ALL_ON_ONE_PAGE == $this->type) { $script = "save_now_all('validate');"; + } elseif (ONE_PER_PAGE == $this->type) { + $script = 'window.quizTimeEnding = true; + $(\'[name="save_now"]\').trigger(\'click\');'; } return "'; echo '