MDL-12264 - course/info: check if course is hidden before displaying info about it.
Author: Matt Clarkson <[email protected]>
This commit is contained in:
@@ -28,6 +28,10 @@
|
||||
require_login();
|
||||
}
|
||||
|
||||
if (!(course_parent_visible($course) || $course->visible) && !has_capability('moodle/course:viewhiddencourses', $context)) {
|
||||
error(get_string('coursehidden'), $CFG->wwwroot .'/');
|
||||
}
|
||||
|
||||
print_header(get_string("summaryof", "", $course->fullname));
|
||||
|
||||
print_heading(format_string($course->fullname) . '<br />(' . format_string($course->shortname) . ')');
|
||||
|
||||
Reference in New Issue
Block a user