]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-8145 - Add more options to the add random questions dropdown.
authortjhunt <tjhunt>
Mon, 19 Feb 2007 04:24:14 +0000 (04:24 +0000)
committertjhunt <tjhunt>
Mon, 19 Feb 2007 04:24:14 +0000 (04:24 +0000)
question/editlib.php

index 747960f010c5d1ff61b1bf897a486951fa8c16c2..00848ed6c2e574f67775314ace0c42f91f9f5c01 100644 (file)
@@ -416,7 +416,10 @@ function question_list($course, $categoryid, $quizid=0,
 
     // add random question
     if ($quizid && has_capability('mod/quiz:manage', $context)) {
-        for ($i=1;$i<=10; $i++) {
+        for ($i = 1;$i <= min(10, $totalnumber); $i++) {
+            $randomcount[$i] = $i;
+        }
+        for ($i = 20;$i <= min(100, $totalnumber); $i += 10) {
             $randomcount[$i] = $i;
         }
         echo '<br />';