MDL-78790 gradereport_grader: Fix sorting.

This commit is contained in:
Ilya Tregubov 2023-08-10 15:02:56 +08:00 committed by Huong Nguyen
parent 3d3dd827fa
commit 25312f1692
No known key found for this signature in database
GPG Key ID: 40D88AB693A3E72A

View File

@ -133,6 +133,9 @@ grade_regrade_final_grades_if_required($course);
if ($sort && strcasecmp($sort, 'desc') !== 0) {
$sort = 'asc';
}
// We have lots of hardcoded 'ASC' and 'DESC' strings in grade/report/grader.lib :(. So we need to uppercase the sort.
$sort = strtoupper($sort);
$report = new grade_report_grader($courseid, $gpr, $context, $page, $sortitemid, $sort);
// We call this a little later since we need some info from the grader report.