Skip to content

Commit

Permalink
Fix #740 - make name hyperlink to profile on attendance user report.
Browse files Browse the repository at this point in the history
  • Loading branch information
danmarsden committed Mar 19, 2024
1 parent 9e2894c commit 9563819
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions classes/output/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -1147,10 +1147,13 @@ protected function render_user_report_tabs(user_data $userdata) {
* @return string
*/
private function construct_user_data(user_data $userdata) {
global $USER;
global $USER, $COURSE;
$o = '';
if ($USER->id <> $userdata->user->id) {
$o = html_writer::tag('h2', fullname($userdata->user));
$userlink = html_writer::link(new \moodle_url('/user/view.php',
['id' => $userdata->user->id, 'course' => $COURSE->id]), fullname($userdata->user));

$o = html_writer::tag('h2', $userlink);
}

if ($userdata->pageparams->mode == mod_attendance_view_page_params::MODE_THIS_COURSE) {
Expand Down

0 comments on commit 9563819

Please sign in to comment.