mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 17:36:38 +02:00
MDL-72772 gradereport_overview: account for users with parent roles.
This commit is contained in:
parent
7cba3c5d13
commit
6d18f136ae
2 changed files with 13 additions and 3 deletions
|
@ -193,7 +193,9 @@ switch ($mode) {
|
|||
require_once $CFG->dirroot.'/grade/report/'.$CFG->grade_profilereport.'/lib.php';
|
||||
|
||||
// User must be able to view this grade report.
|
||||
require_capability('gradereport/' . $CFG->grade_profilereport .':view', $coursecontext);
|
||||
if (!$viewasuser) {
|
||||
require_capability('gradereport/' . $CFG->grade_profilereport . ':view', $coursecontext);
|
||||
}
|
||||
|
||||
$functionname = 'grade_report_'.$CFG->grade_profilereport.'_profilereport';
|
||||
if (function_exists($functionname)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue