From: tjhunt <tjhunt> Date: Wed, 21 Nov 2007 18:09:11 +0000 (+0000) Subject: MDL-12305 - Don't let the quiz reorder tool put a page break at the start of the... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=3db14d77eced47a776b18045b077f54b8d2b9947;p=moodle.git MDL-12305 - Don't let the quiz reorder tool put a page break at the start of the quiz. Merged from MOODLE_19_STABLE. --- diff --git a/mod/quiz/edit.php b/mod/quiz/edit.php index b756480214..28e3e8f930 100644 --- a/mod/quiz/edit.php +++ b/mod/quiz/edit.php @@ -252,6 +252,10 @@ // 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';