From 0e2057cb175c9328b9b4647c4cadcd16737be5a6 Mon Sep 17 00:00:00 2001 From: gustav_delius Date: Sun, 5 Feb 2006 22:55:09 +0000 Subject: [PATCH] Added essay question to list of excluded types for random questions Also fixed type on previous commit --- mod/quiz/questiontypes/random/questiontype.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/quiz/questiontypes/random/questiontype.php b/mod/quiz/questiontypes/random/questiontype.php index 4b5ce10ad3a..d042b574dbb 100644 --- a/mod/quiz/questiontypes/random/questiontype.php +++ b/mod/quiz/questiontypes/random/questiontype.php @@ -7,7 +7,7 @@ /// QUESTION TYPE CLASS ////////////////// class quiz_random_qtype extends quiz_default_questiontype { - var $excludedtypes = array(RANDOM, RANDOMSAMATCH); + var $excludedtypes = array(RANDOM, RANDOMSAMATCH, ESSAY); // Carries questions available as randoms sorted by category // This array is used when needed only @@ -60,7 +60,7 @@ class quiz_random_qtype extends quiz_default_questiontype { AND id NOT IN ($cmoptions->questionsinuse) AND qtype NOT IN ($excludedtypes)"); $this->catrandoms[$question->category][$question->questiontext] = - draw_rand_array(catrandoms, count($catrandoms)); // from bug 1889 + draw_rand_array($catrandoms, count($catrandoms)); // from bug 1889 } while ($wrappedquestion =