mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 00:16:46 +02:00
MDL-20798 fixed missing access control for module intros
This commit is contained in:
parent
384531d5e8
commit
57956cc3e2
1 changed files with 5 additions and 0 deletions
|
@ -461,6 +461,11 @@ if ($context->contextlevel == CONTEXT_SYSTEM) {
|
|||
if (!plugin_supports('mod', $modname, FEATURE_MOD_INTRO, true)) {
|
||||
send_file_not_found();
|
||||
}
|
||||
if (!$cm = get_coursemodule_from_instance($modname, $cminfo->instance, $course->id)) {
|
||||
send_file_not_found();
|
||||
}
|
||||
require_course_login($course, true, $cm);
|
||||
|
||||
if (!$cminfo->uservisible) {
|
||||
send_file_not_found();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue