From: moodler Date: Tue, 31 Aug 2004 10:05:10 +0000 (+0000) Subject: Merged fix for restricted users from stable X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=7b07f632854ee4cbb3879d4dc0a405d9a09b2932;p=moodle.git Merged fix for restricted users from stable --- diff --git a/course/loginas.php b/course/loginas.php index 246003aa16..cc55ae042a 100644 --- a/course/loginas.php +++ b/course/loginas.php @@ -40,6 +40,8 @@ error("Only teachers can use this page!"); } + check_for_restricted_user($USER->username, "$CFG->wwwroot/user/view.php?id=$user&course=$course->id"); + if ($course->category and !isstudent($course->id, $user) and !isadmin()) { error("This student is not in this course!"); }