]> git.mjollnir.org Git - moodle.git/commitdiff
A small fix for showing pictures in randomly-selected questions
authormoodler <moodler>
Wed, 17 Dec 2003 13:35:49 +0000 (13:35 +0000)
committermoodler <moodler>
Wed, 17 Dec 2003 13:35:49 +0000 (13:35 +0000)
mod/quiz/quizfile.php

index 830b00e27ef0e1b4882b8c6c467283a62705b28a..db1b086e9619c6bd84f13e2d42cc956d2fcda92c 100644 (file)
@@ -26,8 +26,7 @@
     $idreg = '[0-9]+';
     if (!ereg("^/?($idreg)/($idreg)/((.+/)?([^/]+))$",
               $pathinfo,
-              $regs) )
-    {
+              $regs) ) {
         error("File parameters are badly formated");
     }
     if (! ($quiz = get_record('quiz', 'id', $regs[1]))) {
     // Now verify the consistency between $quiz, $question, its category and $relativepathname
     ///////////////////////////////////////////////////
 
-    if (!in_array($question->id, explode(',', $quiz->questions), FALSE)) {
-        error("Specified question is not on the specified quiz");
-    }
+    // For now, let's not worry about this.  The following check doesn't 
+    // work for randomly selected questions and it gets complicated
+    //if (!in_array($question->id, explode(',', $quiz->questions), FALSE)) {
+    //    error("Specified question is not on the specified quiz");
+    //}
+
     if (! ($questioncategory = get_record('quiz_categories', 'id',
                                           $question->category)))
     {