From: moodler Date: Thu, 21 Aug 2003 17:28:05 +0000 (+0000) Subject: Allow the admin to login as teachers from within courses X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=1069e8dc3bdebfccf2d52780e3a8eafdeb10d520;p=moodle.git Allow the admin to login as teachers from within courses --- diff --git a/course/loginas.php b/course/loginas.php index 9091d8aeda..022de5f773 100644 --- a/course/loginas.php +++ b/course/loginas.php @@ -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!"); }