Browse Source

Add user's remarks to report

MOODLE_26_STABLE
Nadav Kavalerchik 11 years ago
committed by Dan Marsden
parent
commit
33db1a1b04
  1. 15
      renderer.php

15
renderer.php

@ -689,8 +689,8 @@ class mod_attendance_renderer extends plugin_renderer_base {
get_string('status', 'attendance'), get_string('status', 'attendance'),
get_string('remarks', 'attendance') get_string('remarks', 'attendance')
); );
$table->align = array('', '', '', 'left', 'left', 'center', 'left'); $table->align = array('', '', '', 'left', 'left', 'center', 'left', 'center');
$table->size = array('1px', '1px', '1px', '1px', '*', '1px', '1px'); $table->size = array('1px', '1px', '1px', '1px', '*', '1px', '1px', '*');
$i = 0; $i = 0;
foreach ($userdata->sessionslog as $sess) { foreach ($userdata->sessionslog as $sess) {
@ -773,7 +773,13 @@ class mod_attendance_renderer extends plugin_renderer_base {
$table->align[] = 'center'; $table->align[] = 'center';
$table->size[] = '1px'; $table->size[] = '1px';
} }
if ($reportdata->sessionslog) {
$table->head[] = get_string('remarks', 'attendance');
$table->align[] = 'center';
$table->size[] = '200px';
}
foreach ($reportdata->users as $user) { foreach ($reportdata->users as $user) {
$row = new html_table_row(); $row = new html_table_row();
@ -795,6 +801,9 @@ class mod_attendance_renderer extends plugin_renderer_base {
$row->cells[] = $reportdata->grades[$user->id].' / '.$reportdata->maxgrades[$user->id]; $row->cells[] = $reportdata->grades[$user->id].' / '.$reportdata->maxgrades[$user->id];
} }
if ($reportdata->sessionslog) {
$row->cells[] = $reportdata->sessionslog[$user->id][$sess->id]->remarks;
}
$table->data[] = $row; $table->data[] = $row;
} }

Loading…
Cancel
Save