mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Merged MDL-6885 from stable
This commit is contained in:
parent
121d921b4c
commit
215965673b
@ -1630,8 +1630,15 @@ function require_login($courseid=0, $autologinguest=true, $cm=null) {
|
||||
break;
|
||||
|
||||
default: /// Guests not allowed
|
||||
print_header_simple();
|
||||
notice(get_string('guestsnotallowed', '', $course->fullname), "$CFG->wwwroot/login/index.php");
|
||||
print_header_simple('', '', get_string('loggedinasguest'));
|
||||
if (empty($USER->switchrole[$context->id])) { // Normal guest
|
||||
notice(get_string('guestsnotallowed', '', $course->fullname), "$CFG->wwwroot/login/index.php");
|
||||
} else {
|
||||
notify(get_string('guestsnotallowed', '', $course->fullname));
|
||||
echo '<div class="notifyproblem">'.switchroles_form($course->id).'</div>';
|
||||
print_footer($course);
|
||||
exit;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user