MDL-12382 allow admins to access any course - including courses where they have guest role and course does not allow guests

This commit is contained in:
skodak
2008-02-18 23:39:28 +00:00
parent adb4cdc5a8
commit 827ea538e5
+1 -1
View File
@@ -1959,7 +1959,7 @@ function require_login($courseorid=0, $autologinguest=true, $cm=null) {
if (has_capability('moodle/legacy:guest', $COURSE->context, NULL, false)) {
if (has_capability('moodle/site:doanything', $sysctx)) {
// administrators must be able to access any course - even if somebody gives them guest access
return true;
return;
}
switch ($COURSE->guest) { /// Check course policy about guest access