From: moodler <moodler>
Date: Sun, 6 Jul 2003 04:08:11 +0000 (+0000)
Subject: Description questions should not be selected randomly
X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=575de48fc393c4b5c3f235e11cff5a2624f3c59a;p=moodle.git

Description questions should not be selected randomly
---

diff --git a/mod/quiz/lib.php b/mod/quiz/lib.php
index 585b2b0cb0..8c569f18ad 100644
--- a/mod/quiz/lib.php
+++ b/mod/quiz/lib.php
@@ -931,7 +931,10 @@ function quiz_choose_random_questions($category, $draws, $excluded=0) {
 /// creates a random subset of that size - returned as an array of questions
 
     if (!$pool = get_records_select_menu("quiz_questions", 
-                "category = '$category' AND id NOT IN ($excluded) AND qtype <> ".RANDOM, "", "id,qtype")) {
+                "category = '$category' AND id NOT IN ($excluded) 
+                                        AND qtype <> ".RANDOM." 
+                                        AND qtype <> ".DESCRIPTION, 
+                                        "", "id,qtype")) {
         return false;
     }