mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Merge branch 'wip-MDL-38300-m25' of git://github.com/samhemelryk/moodle
This commit is contained in:
commit
2b48123b92
1 changed files with 2 additions and 2 deletions
|
@ -3976,14 +3976,14 @@ class settings_navigation extends navigation_node {
|
|||
$reportfunction($reporttab, $user, $course);
|
||||
}
|
||||
$anyreport = has_capability('moodle/user:viewuseractivitiesreport', $usercontext);
|
||||
if ($anyreport || ($course->showreports && $iscurrentuser && $forceforcontext)) {
|
||||
if ($anyreport || ($course->showreports && $currentuser && $forceforcontext)) {
|
||||
// Add grade hardcoded grade report if necessary.
|
||||
$gradeaccess = false;
|
||||
if (has_capability('moodle/grade:viewall', $coursecontext)) {
|
||||
// Can view all course grades.
|
||||
$gradeaccess = true;
|
||||
} else if ($course->showgrades) {
|
||||
if ($iscurrentuser && has_capability('moodle/grade:view', $coursecontext)) {
|
||||
if ($currentuser && has_capability('moodle/grade:view', $coursecontext)) {
|
||||
// Can view own grades.
|
||||
$gradeaccess = true;
|
||||
} else if (has_capability('moodle/grade:viewall', $usercontext)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue