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 58312c1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 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
2 changes: 1 addition & 1 deletion classes/structure.php
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ public function add_sessions($sessions) {
/**
* Save customfields
*
* @param int $sessions
* @param int $sessionid
* @param object $formdata
* @return void
*/
Expand Down

0 comments on commit 58312c1

Please sign in to comment.