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:
moodler 2003-05-14 16:52:25 +00:00
parent a53cef7e80
commit d288fa5255

View File

@ -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
}
}