]> git.mjollnir.org Git - moodle.git/commitdiff
Merged fix to allow teacher to always take quiz
authormoodler <moodler>
Thu, 11 Nov 2004 02:22:08 +0000 (02:22 +0000)
committermoodler <moodler>
Thu, 11 Nov 2004 02:22:08 +0000 (02:22 +0000)
mod/quiz/attempt.php
mod/quiz/view.php

index 8ca8cc933038a0780e419b13b54f6cc4f74971c9..13b98ac3621c86f1b15b23bd01d9dc15b0175893 100644 (file)
     }
 /// END EDIT
     $timenow = time();
-    $available = ($quiz->timeopen < $timenow and $timenow < $quiz->timeclose);
+    $available = ($quiz->timeopen < $timenow and $timenow < $quiz->timeclose) || isteacher($course->id);
 
 /// Check to see if they are submitting answers
     if ($rawanswers = data_submitted()) {
index bb0ce407b441e94f1bde48b0c722112846315c1b..b1db02e3f90828e3765939f08d8337244f3eed2c 100644 (file)
@@ -59,7 +59,7 @@
         notice(get_string("activityiscurrentlyhidden"));
     }
 
-    $available = ($quiz->timeopen < $timenow and $timenow < $quiz->timeclose);
+    $available = ($quiz->timeopen < $timenow and $timenow < $quiz->timeclose) || isteacher($course->id);
 
 // Print the main part of the page