MDL-78106 gradereport_grader: Force direction when clicking sort arrow
This commit is contained in:
@@ -598,6 +598,11 @@ abstract class grade_report {
|
||||
$matrix = ['up' => 'desc', 'down' => 'asc'];
|
||||
$strsort = get_string($matrix[$direction], 'moodle');
|
||||
$arrow = $OUTPUT->pix_icon($pix[$direction], '', '', ['class' => 'sorticon']);
|
||||
|
||||
if (!empty($sortlink)) {
|
||||
$sortlink->param('sort', ($direction == 'up' ? 'asc' : 'desc'));
|
||||
}
|
||||
|
||||
return html_writer::link($sortlink, $arrow, ['title' => $strsort, 'aria-label' => $strsort, 'data-collapse' => 'sort',
|
||||
'class' => 'arrow_link py-1']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user