Skip to content

Commit

Permalink
MDL-63571 grades: switch firstname/lastname order in title row
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaboesch committed Nov 13, 2018
1 parent dccda65 commit b08e731
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions grade/report/grader/lib.php
Expand Up @@ -1914,19 +1914,19 @@ public function get_sort_arrows(array $extrafields = array()) {
$firstlink = html_writer::link(new moodle_url($this->baseurl, array('sortitemid'=>'firstname')), $strfirstname);
$lastlink = html_writer::link(new moodle_url($this->baseurl, array('sortitemid'=>'lastname')), $strlastname);

$arrows['studentname'] = $lastlink;
$arrows['studentname'] = $firstlink;

if ($this->sortitemid === 'lastname') {
if ($this->sortitemid === 'firstname') {
if ($this->sortorder == 'ASC') {
$arrows['studentname'] .= $iconasc;
} else {
$arrows['studentname'] .= $icondesc;
}
}

$arrows['studentname'] .= ' ' . $firstlink;
$arrows['studentname'] .= ' ' . $lastlink;

if ($this->sortitemid === 'firstname') {
if ($this->sortitemid === 'lastname') {
if ($this->sortorder == 'ASC') {
$arrows['studentname'] .= $iconasc;
} else {
Expand Down

0 comments on commit b08e731

Please sign in to comment.