mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
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
This commit is contained in:
parent
5f431c1bad
commit
b03f7215c7
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue