mirror of
https://github.com/moodle/moodle.git
synced 2025-08-11 03:46:42 +02:00
MDL-19797 Upgraded most output code in grader report
This commit is contained in:
parent
c402af03a8
commit
319770d747
8 changed files with 311 additions and 223 deletions
|
@ -316,15 +316,18 @@ abstract class grade_report {
|
|||
/**
|
||||
* Returns an arrow icon inside an <a> tag, for the purpose of sorting a column.
|
||||
* @param string $direction
|
||||
* @param string $sort_link
|
||||
* @param moodle_url $sort_link
|
||||
* @param string HTML
|
||||
*/
|
||||
protected function get_sort_arrow($direction='move', $sort_link=null) {
|
||||
protected function get_sort_arrow($direction='move', $sortlink=null) {
|
||||
global $OUTPUT;
|
||||
$matrix = array('up' => 'desc', 'down' => 'asc', 'move' => 'desc');
|
||||
$strsort = $this->get_lang_string('sort' . $matrix[$direction]);
|
||||
|
||||
$arrow = print_arrow($direction, $strsort, true);
|
||||
$html = '<a href="'.$sort_link .'" title="'.$strsort.'">' . $arrow . '</a>';
|
||||
$link = html_link::make($sortlink, $arrow);
|
||||
$link->title = $strsort;
|
||||
$html = $OUTPUT->link($link);
|
||||
return $html;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue