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:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user