MDL-54865 grade: student name hyperlinked in gradebook user report
authorLuca Bösch <luca.boesch@bfh.ch>
Fri, 10 Jun 2016 10:30:28 +0000 (12:30 +0200)
committerRyan Wyllie <ryan@moodle.com>
Thu, 23 Jun 2016 04:22:10 +0000 (04:22 +0000)
In the Gradebook, User report, the student's name (at the top) is a hyperlink
to that student's account. In most places where a student's name shows
(e.g. the Grader report) it is most often a hyperlink.

grade/lib.php

index 1c0da1e..2983874 100644 (file)
@@ -1039,7 +1039,8 @@ function print_grade_page_head($courseid, $active_type, $active_plugin=null,
             if (isset($user)) {
                 $output = $OUTPUT->context_header(
                         array(
-                            'heading' => fullname($user),
+                            'heading' => html_writer::link(new moodle_url('/user/view.php', array('id' => $user->id,
+                                'course' => $courseid)), fullname($user)),
                             'user' => $user,
                             'usercontext' => context_user::instance($user->id)
                         ), 2