diff --git a/grade/report/grader/index.php b/grade/report/grader/index.php index df6efd02e51..2990296d32d 100644 --- a/grade/report/grader/index.php +++ b/grade/report/grader/index.php @@ -33,7 +33,7 @@ $page = optional_param('page', 0, PARAM_INT); // active page $edit = optional_param('edit', -1, PARAM_BOOL); // sticky editting mode $sortitemid = optional_param('sortitemid', 0, PARAM_ALPHANUMEXT); -$sort = optional_param('sort', '', PARAM_TEXT); +$sort = optional_param('sort', '', PARAM_ALPHA); $action = optional_param('action', 0, PARAM_ALPHAEXT); $move = optional_param('move', 0, PARAM_INT); $type = optional_param('type', 0, PARAM_ALPHA); @@ -130,8 +130,8 @@ grade_regrade_final_grades_if_required($course); //Initialise the grader report object that produces the table //the class grade_report_grader_ajax was removed as part of MDL-21562 -if ($sort) { - $sort = strtoupper($sort); +if ($sort && strcasecmp($sort, 'desc') !== 0) { + $sort = 'asc'; } $report = new grade_report_grader($courseid, $gpr, $context, $page, $sortitemid, $sort);