From 150128c0f3bb22d23f822a7c5123e84b2521aee5 Mon Sep 17 00:00:00 2001 From: Dan Marsden Date: Thu, 14 Jan 2021 13:48:16 +1300 Subject: [PATCH] Pass raw data to absentee export. --- absentee.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/absentee.php b/absentee.php index 1fcc288..db8b7f3 100644 --- a/absentee.php +++ b/absentee.php @@ -122,14 +122,18 @@ foreach ($records as $record) { if (!$table->is_downloading($download, $exportfilename)) { $url = new moodle_url('/mod/attendance/index.php', array('id' => $record->courseid)); $name = html_writer::link($url, $record->coursename); + + $url = new moodle_url('/mod/attendance/view.php', array('studentid' => $record->userid, + 'id' => $record->cmid, 'view' => ATT_VIEW_ALL)); + $attendancename = html_writer::link($url, $record->aname); + + $username = html_writer::link($url, fullname($record)); } else { $name = $record->coursename; + $attendancename = $record->aname; + $username = fullname($record); } - $url = new moodle_url('/mod/attendance/view.php', array('studentid' => $record->userid, - 'id' => $record->cmid, 'view' => ATT_VIEW_ALL)); - $attendancename = html_writer::link($url, $record->aname); - $username = html_writer::link($url, fullname($record)); $percent = round($record->percent * 100)."%"; $timesent = "-"; if (!empty($record->timesent)) {