MDL-63571 grade_report_grader: Use correct context for capability check

This commit is contained in:
Jun Pataleta
2018-11-22 16:20:22 +08:00
parent 83a6d7a194
commit e92bb861d4
+1 -1
View File
@@ -1911,7 +1911,7 @@ class grade_report_grader extends grade_report {
// Sourced from tablelib.php
// Check the full name display for sortable fields.
if (has_capability('moodle/site:viewfullnames', context_system::instance())) {
if (has_capability('moodle/site:viewfullnames', $this->context)) {
$nameformat = $CFG->alternativefullnameformat;
} else {
$nameformat = $CFG->fullnamedisplay;