mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
MDL-45126 do not allow guests see name and summary of hidden course
This commit is contained in:
parent
679e323aaa
commit
eaea796e70
@ -41,6 +41,10 @@ if ($course->id == SITEID) {
|
||||
redirect("$CFG->wwwroot/");
|
||||
}
|
||||
|
||||
if (!$course->visible && !has_capability('moodle/course:viewhiddencourses', context_course::instance($course->id))) {
|
||||
print_error('coursehidden');
|
||||
}
|
||||
|
||||
$PAGE->set_course($course);
|
||||
$PAGE->set_pagelayout('course');
|
||||
$PAGE->set_url('/enrol/index.php', array('id'=>$course->id));
|
||||
|
Loading…
x
Reference in New Issue
Block a user