Wierd random generation problem

Wierd random generation problem

by trevor delamor -
Number of replies: 0

 I've edited the code from creating 10 random questions to 100 random questions. it generated fine, but i generated 100 out of my test banks of 400 and some wierd i''ve had some wierd behaviour. My category EN3 got about 35 questions from my MTG4 category and the quiz was consisting of both categories questions when i only wanted EN3 category questions. When i edited the code i changed the following :


if ($quizselected and isteacheredit($category->course)) {
for($i=1;$i<=10;$i++) {
    $randomcount[$i] = $i;
}

changed it to 100 instead of 10 roughly line 1437 in lib.php in ~/moodle/mod/quiz/

Is there a way to have it randomly generate 100 instead of 10 without having this wierd behaviour? Maybe im missing something in that file. I can't find it.

Thanks,

Trevor

Average of ratings: -