]> git.mjollnir.org Git - moodle.git/commitdiff
Removing some security checks that seem to cause trouble
authormoodler <moodler>
Mon, 3 May 2004 02:12:45 +0000 (02:12 +0000)
committermoodler <moodler>
Mon, 3 May 2004 02:12:45 +0000 (02:12 +0000)
mod/quiz/quizfile.php

index db1b086e9619c6bd84f13e2d42cc956d2fcda92c..28cc7cd0dde3a4e9a4c56a38d53437741f936df8 100644 (file)
     if (! ($course = get_record("course", "id", $quiz->course))) {
         error("Supplied quiz $quiz->name does not belong to a valid course");
     }
+
     require_login($course->id);
-    if (!isteacher($course->id)
-        and !quiz_get_user_attempt_unfinished($quiz->id, $USER->id)
-        and ! ($quiz->review  &&  time() > $quiz->timeclose)
-            || !quiz_get_user_attempts($quiz->id, $USER->id) )
-    {
-        error("Logged-in user is not allowed to view this quiz");
-    }
+
+    // For now, let's not worry about this.  The following check causes 
+    // problems sometimes when reviewing a quiz
+    //if (!isteacher($course->id)
+    //    and !quiz_get_user_attempt_unfinished($quiz->id, $USER->id)
+    //    and ! ($quiz->review  &&  time() > $quiz->timeclose)
+    //        || !quiz_get_user_attempts($quiz->id, $USER->id) )
+    //{
+    //    error("Logged-in user is not allowed to view this quiz");
+    //}
 
     ///////////////////////////////////////////////////
     // The logged-in user has the right to view material on this quiz!