From 3db14d77eced47a776b18045b077f54b8d2b9947 Mon Sep 17 00:00:00 2001 From: tjhunt Date: Wed, 21 Nov 2007 18:09:11 +0000 Subject: [PATCH] MDL-12305 - Don't let the quiz reorder tool put a page break at the start of the quiz. Merged from MOODLE_19_STABLE. --- mod/quiz/edit.php | 4 ++++ 1 file changed, 4 insertions(+) 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'; -- 2.39.5