MDL-68343 gradereport_singleview: Remove adjacent links to the same URL
authorShamim Rezaie <shamim@moodle.com>
Mon, 6 Apr 2020 09:23:54 +0000 (19:23 +1000)
committerShamim Rezaie <shamim@moodle.com>
Tue, 21 Apr 2020 18:30:53 +0000 (04:30 +1000)
grade/report/singleview/classes/local/screen/grade.php

index 7d86723..f3b4ad7 100644 (file)
@@ -208,12 +208,12 @@ class grade extends tablelike implements selectable_items, filterable_items {
         $url = new moodle_url("/user/view.php", array('id' => $item->id, 'course' => $this->courseid));
         $iconstring = get_string('filtergrades', 'gradereport_singleview', $fullname);
         $grade->label = $fullname;
+        $userpic = $OUTPUT->user_picture($item, ['link' => false, 'visibletoscreenreaders' => false]);
 
         $line = array(
             $OUTPUT->action_icon($this->format_link('user', $item->id), new pix_icon('t/editstring', ''), null,
                     ['title' => $iconstring, 'aria-label' => $iconstring]),
-            $OUTPUT->user_picture($item, array('visibletoscreenreaders' => false)) .
-            html_writer::link($url, $fullname),
+            html_writer::link($url, $userpic . $fullname),
             $this->item_range()
         );
         $lineclasses = array(