mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-29392 grade/report/index.php should use $CFG->grade_profilereport
This commit is contained in:
parent
9cfaebbd0e
commit
5cd7869883
@ -38,7 +38,7 @@ foreach ($reports as $plugin => $plugindir) { // Remove one
|
||||
}
|
||||
|
||||
if (empty($reports)) {
|
||||
print_error('noreports', 'debug', $CFG->wwwroot.'/course/view.php?id='.$course->id); // TODO: localize
|
||||
print_error('noreports', 'debug', $CFG->wwwroot.'/course/view.php?id='.$course->id);
|
||||
}
|
||||
|
||||
if (!isset($USER->grade_last_report)) {
|
||||
@ -59,11 +59,12 @@ if (empty($last)) {
|
||||
if (array_key_exists('grader', $reports)) {
|
||||
$last = 'grader';
|
||||
|
||||
} else if (array_key_exists('user', $reports)) {
|
||||
$last = 'user';
|
||||
} else if (array_key_exists($CFG->grade_profilereport, $reports)) {
|
||||
$last = $CFG->grade_profilereport;
|
||||
|
||||
} else {
|
||||
$last = key(reset($reports));
|
||||
reset($reports);
|
||||
$last = key($reports);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user