mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 18:06:51 +02:00
MDL-17464 profile reports are now respecting course report caps
This commit is contained in:
parent
683dacd065
commit
358e2a0bd2
8 changed files with 140 additions and 54 deletions
|
@ -24,7 +24,9 @@
|
|||
require_login($course);
|
||||
$context = get_context_instance(CONTEXT_COURSE, $course->id);
|
||||
|
||||
require_capability('coursereport/stats:view', $context);
|
||||
if (!$course->showreports or $USER->id != $userid) {
|
||||
require_capability('coursereport/stats:view', $context);
|
||||
}
|
||||
|
||||
stats_check_uptodate($course->id);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue