Prevent restricted users from using "login as"
This commit is contained in:
@@ -40,6 +40,8 @@
|
||||
error("Only teachers can use this page!");
|
||||
}
|
||||
|
||||
check_for_restricted_user($USER->username, "$CFG->wwwroot/user/view.php?id=$user");
|
||||
|
||||
if ($course->category and !isstudent($course->id, $user) and !isadmin()) {
|
||||
error("This student is not in this course!");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user