]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-12305 - Don't let the quiz reorder tool put a page break at the start of the...
authortjhunt <tjhunt>
Wed, 21 Nov 2007 18:09:11 +0000 (18:09 +0000)
committertjhunt <tjhunt>
Wed, 21 Nov 2007 18:09:11 +0000 (18:09 +0000)
mod/quiz/edit.php

index b7564802145697d7d4a4a2df88f94e9e84e5a2f8..28e3e8f930b92183951378280ae6a3ad68fd4e1f 100644 (file)
         // If ordering info was given, reorder the questions
         if ($questions) {
             ksort($questions);
+            // Make sure that the quiz does not start with a page break.
+            while (reset($questions) == '0') {
+                array_shift($questions);
+            }
             $quiz->questions = implode(",", $questions);
             // Always have a page break at the end
             $quiz->questions = $quiz->questions . ',0';