mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +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);
|
$reportfunction($reporttab, $user, $course);
|
||||||
}
|
}
|
||||||
$anyreport = has_capability('moodle/user:viewuseractivitiesreport', $usercontext);
|
$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.
|
// Add grade hardcoded grade report if necessary.
|
||||||
$gradeaccess = false;
|
$gradeaccess = false;
|
||||||
if (has_capability('moodle/grade:viewall', $coursecontext)) {
|
if (has_capability('moodle/grade:viewall', $coursecontext)) {
|
||||||
// Can view all course grades.
|
// Can view all course grades.
|
||||||
$gradeaccess = true;
|
$gradeaccess = true;
|
||||||
} else if ($course->showgrades) {
|
} else if ($course->showgrades) {
|
||||||
if ($iscurrentuser && has_capability('moodle/grade:view', $coursecontext)) {
|
if ($currentuser && has_capability('moodle/grade:view', $coursecontext)) {
|
||||||
// Can view own grades.
|
// Can view own grades.
|
||||||
$gradeaccess = true;
|
$gradeaccess = true;
|
||||||
} else if (has_capability('moodle/grade:viewall', $usercontext)) {
|
} else if (has_capability('moodle/grade:viewall', $usercontext)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue