Browse Source

Pass raw data to absentee export.

MOODLE_38_STABLE
Dan Marsden 4 years ago
parent
commit
150128c0f3
  1. 10
      absentee.php

10
absentee.php

@ -122,14 +122,18 @@ foreach ($records as $record) {
if (!$table->is_downloading($download, $exportfilename)) { if (!$table->is_downloading($download, $exportfilename)) {
$url = new moodle_url('/mod/attendance/index.php', array('id' => $record->courseid)); $url = new moodle_url('/mod/attendance/index.php', array('id' => $record->courseid));
$name = html_writer::link($url, $record->coursename); $name = html_writer::link($url, $record->coursename);
} else {
$name = $record->coursename;
}
$url = new moodle_url('/mod/attendance/view.php', array('studentid' => $record->userid, $url = new moodle_url('/mod/attendance/view.php', array('studentid' => $record->userid,
'id' => $record->cmid, 'view' => ATT_VIEW_ALL)); 'id' => $record->cmid, 'view' => ATT_VIEW_ALL));
$attendancename = html_writer::link($url, $record->aname); $attendancename = html_writer::link($url, $record->aname);
$username = html_writer::link($url, fullname($record)); $username = html_writer::link($url, fullname($record));
} else {
$name = $record->coursename;
$attendancename = $record->aname;
$username = fullname($record);
}
$percent = round($record->percent * 100)."%"; $percent = round($record->percent * 100)."%";
$timesent = "-"; $timesent = "-";
if (!empty($record->timesent)) { if (!empty($record->timesent)) {

Loading…
Cancel
Save