From 71e5b1bb854335b04357d6f553ad85b6359dd07c Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Wed, 13 Nov 2013 11:48:02 +0100 Subject: [PATCH] Should fix bug when getting question list pagination see BT#6996 --- main/exercice/exercise.class.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/main/exercice/exercise.class.php b/main/exercice/exercise.class.php index 779e4a80f4..577ff304cd 100644 --- a/main/exercice/exercise.class.php +++ b/main/exercice/exercise.class.php @@ -7905,6 +7905,9 @@ class Exercise /** * @param int $exeId * @param array $exercise_stat_info + * @param array $remindList + * @param int $currentQuestion + * @return int */ public static function getNextQuestionId($exeId, $exercise_stat_info, $remindList, $currentQuestion) { @@ -7935,6 +7938,7 @@ class Exercise } } + // Only use this feature if all questions were answered and there are contents in the $remindList /*if (count($answeredQuestions) == count($result['question_list']) && empty($remindList)) { return null; @@ -8008,6 +8012,10 @@ class Exercise return $counterRemindListQuestions; } } + } else { + if ($currentQuestion > $counterAnsweredQuestions) { + $counterAnsweredQuestions = $currentQuestion + 1; + } } return $counterAnsweredQuestions; }