From: moodler Date: Thu, 16 Sep 2004 05:43:19 +0000 (+0000) Subject: Merged randomisation fix from stable X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=b3484504bb064da5f1e48eb5b44d5c88e2cdcd4e;p=moodle.git Merged randomisation fix from stable --- diff --git a/mod/quiz/questiontypes/random/questiontype.php b/mod/quiz/questiontypes/random/questiontype.php index 7293c1283c..02b2e4983b 100644 --- a/mod/quiz/questiontypes/random/questiontype.php +++ b/mod/quiz/questiontypes/random/questiontype.php @@ -84,7 +84,9 @@ class quiz_random_qtype extends quiz_default_questiontype { WHERE category = '$question->category' AND id NOT IN ($questionsinuse) AND qtype IN ($possiblerandomqtypes)"); - shuffle($this->catrandoms[$question->category]); + $this->catrandoms[$question->category] = + draw_rand_array($this->catrandoms[$question->category], + count($this->catrandoms[$question->category])); // from bug 1889 } while ($randomquestion =