MDL-12305 - Don't let the quiz reorder tool put a page break at the start of the quiz. Merged from MOODLE_19_STABLE.

This commit is contained in:
tjhunt 2007-11-21 18:09:11 +00:00
parent cd6ef0a5bb
commit 3db14d77ec

View File

@ -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';