Browse Source

Pass raw data to absentee export.

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

12
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);
$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 { } else {
$name = $record->coursename; $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)."%"; $percent = round($record->percent * 100)."%";
$timesent = "-"; $timesent = "-";
if (!empty($record->timesent)) { if (!empty($record->timesent)) {

Loading…
Cancel
Save