]> git.mjollnir.org Git - moodle.git/commitdiff
Merged randomisation fix from stable
authormoodler <moodler>
Thu, 16 Sep 2004 05:43:19 +0000 (05:43 +0000)
committermoodler <moodler>
Thu, 16 Sep 2004 05:43:19 +0000 (05:43 +0000)
mod/quiz/questiontypes/random/questiontype.php

index 7293c1283c529781e15e4af5043996b96a60c4ce..02b2e4983b8ce7213ba2d3ae826cfebbf29a2baa 100644 (file)
@@ -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 =