Fix loop when time control see #1618

pull/2487/head
jmontoyaa 9 years ago
parent 086b69b327
commit 2a1269458a
  1. 1
      main/exercise/exercise.php
  2. 6
      main/exercise/exercise_submit.php

@ -69,6 +69,7 @@ Session::erase('objQuestion');
Session::erase('objAnswer');
Session::erase('questionList');
Session::erase('exerciseResult');
Session::erase('firstTime');
//General POST/GET/SESSION/COOKIES parameters recovery
$origin = isset($_REQUEST['origin']) ? Security::remove_XSS($_REQUEST['origin']) : null;

@ -523,7 +523,11 @@ if (!empty($questionList)) {
}
if ($current_question > $question_count) {
$current_question = 0;
// If time control then don't change the current question, otherwise there will be a loop.
// @todo
if ($time_control == false) {
$current_question = 0;
}
}
if ($formSent && isset($_POST)) {

Loading…
Cancel
Save