Permalink
Browse files

MDL-8145 - Add more options to the add random questions dropdown.

  • Loading branch information...
1 parent 3b00cdb commit 85a430d5bebd164d2e80796771170da7e4e94ddf tjhunt committed Feb 19, 2007
Showing with 6 additions and 3 deletions.
  1. +6 −3 question/editlib.php
View
@@ -410,7 +410,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 />';
@@ -422,7 +425,7 @@ function question_list($course, $categoryid, $quizid=0,
helpbutton('random', get_string('random', 'quiz'), 'quiz');
}
- echo "</form>\n";
+ echo "</form>\n";
}
-?>
+?>

0 comments on commit 85a430d

Please sign in to comment.