mirror of
https://github.com/moodle/moodle.git
synced 2025-01-31 20:53:53 +01:00
Close loophole for invisible courses by re-enrolment
This commit is contained in:
parent
9ee379868a
commit
1efa27fdbb
@ -309,6 +309,10 @@ function require_login($courseid=0) {
|
||||
if (! $course = get_record("course", "id", $courseid)) {
|
||||
error("That course doesn't exist");
|
||||
}
|
||||
if (!$course->visible) {
|
||||
print_header();
|
||||
notice(get_string("studentnotallowed", "", "$USER->firstname $USER->lastname"), $CFG->wwwroot);
|
||||
}
|
||||
if ($USER->username == "guest") {
|
||||
switch ($course->guest) {
|
||||
case 0: // Guests not allowed
|
||||
|
Loading…
x
Reference in New Issue
Block a user