mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
Better code to deal with shuffleorder.
Now feedback is always in the same order as the quiz, and reports are always in the natural order.
This commit is contained in:
parent
a53cef7e80
commit
d288fa5255
@ -716,11 +716,13 @@ function quiz_print_quiz_questions($quiz, $results=NULL, $questions=NULL, $shuff
|
||||
notify("Error when reading questions from the database!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($quiz->shufflequestions)) { // Mix everything up
|
||||
if (!$shuffleorder) {
|
||||
if (!empty($quiz->shufflequestions)) { // Mix everything up
|
||||
$questions = swapshuffle_assoc($questions);
|
||||
} else {
|
||||
$shuffleorder= explode(",", $quiz->questions); // Use defined order
|
||||
$shuffleorder = explode(",", $quiz->questions); // Use originally defined order
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user