From b03f7215c75d617fa96d51989ad32d7c0e82397d Mon Sep 17 00:00:00 2001 From: skodak Date: Mon, 18 Feb 2008 23:40:21 +0000 Subject: [PATCH] MDL-12382 allow admins to access any course - including courses where they have guest role and course does not allow guests; merged from MOODLE_19_STABLE --- lib/moodlelib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 37abbaa816..ac4e13a3c6 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -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 -- 2.39.5