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

This commit is contained in:
tjhunt
2007-11-21 18:08:56 +00:00
parent a5f1acc2b4
commit 4a0f06d551
+4
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';