]> git.mjollnir.org Git - moodle.git/commitdiff
Allow the admin to login as teachers from within courses
authormoodler <moodler>
Thu, 21 Aug 2003 17:28:05 +0000 (17:28 +0000)
committermoodler <moodler>
Thu, 21 Aug 2003 17:28:05 +0000 (17:28 +0000)
course/loginas.php

index 9091d8aeda47d23661e6e502f256be7815503ddb..022de5f7737fab8586d6b046c7f945cabab5f993 100644 (file)
@@ -28,7 +28,7 @@
         error("Only teachers can use this page!");
     }
 
-    if ($course->category and !isstudent($course->id, $user)) {
+    if ($course->category and !isstudent($course->id, $user) and !isadmin()) {
         error("This student is not in this course!");
     }