From ea4ff4f691671802a6eb7d9a66a854cbd5ef4cfd Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Thu, 13 Sep 2018 15:34:28 +0200 Subject: [PATCH] Fix review question + time left in exercise error see BT#14821 --- main/exercise/exercise.class.php | 9 +++++++-- main/exercise/exercise_submit.php | 10 +++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/main/exercise/exercise.class.php b/main/exercise/exercise.class.php index 512ac46b68..442f43f552 100755 --- a/main/exercise/exercise.class.php +++ b/main/exercise/exercise.class.php @@ -3229,7 +3229,11 @@ class Exercise */ public function showTimeControlJS($time_left) { - $time_left = intval($time_left); + $time_left = (int) $time_left; + $script = "redirectExerciseToResult();"; + if ($this->type == ALL_ON_ONE_PAGE) { + $script = "save_now_all('validate');"; + } return "