|
@ -856,14 +856,18 @@ class mod_attendance_renderer extends plugin_renderer_base { |
|
|
$table->attributes['class'] .= ' summaryreport'; |
|
|
$table->attributes['class'] .= ' summaryreport'; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$colclass = null; |
|
|
|
|
|
|
|
|
// User picture. |
|
|
// User picture. |
|
|
$table->head[] = ''; |
|
|
$table->head[] = ''; |
|
|
$table->align[] = 'left'; |
|
|
$table->align[] = 'left'; |
|
|
$table->size[] = '1px'; |
|
|
$table->size[] = '1px'; |
|
|
|
|
|
$table->colclasses[] = $colclass; |
|
|
|
|
|
|
|
|
$table->head[] = $this->construct_fullname_head($reportdata); |
|
|
$table->head[] = $this->construct_fullname_head($reportdata); |
|
|
$table->align[] = 'left'; |
|
|
$table->align[] = 'left'; |
|
|
$table->size[] = ''; |
|
|
$table->size[] = ''; |
|
|
|
|
|
$table->colclasses[] = $colclass; |
|
|
$sessionstats = array(); |
|
|
$sessionstats = array(); |
|
|
|
|
|
|
|
|
foreach ($reportdata->sessions as $sess) { |
|
|
foreach ($reportdata->sessions as $sess) { |
|
@ -892,40 +896,65 @@ class mod_attendance_renderer extends plugin_renderer_base { |
|
|
$table->head[] = $sesstext; |
|
|
$table->head[] = $sesstext; |
|
|
$table->align[] = 'center'; |
|
|
$table->align[] = 'center'; |
|
|
$table->size[] = '1px'; |
|
|
$table->size[] = '1px'; |
|
|
|
|
|
$table->colclasses[] = $colclass; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$setnumber = -1; |
|
|
|
|
|
foreach ($reportdata->statuses AS $sts) { |
|
|
|
|
|
if ($sts->setnumber != $setnumber) { |
|
|
|
|
|
$colclass = empty($colclass) ? 'columncontrast' : null; |
|
|
|
|
|
$setnumber = $sts->setnumber; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$table->head[] = $sts->acronym; |
|
|
|
|
|
$table->align[] = 'center'; |
|
|
|
|
|
$table->size[] = '1px'; |
|
|
|
|
|
$table->colclasses[] = $colclass; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
$table->head[] = get_string('takensessions', 'attendance'); |
|
|
$table->head[] = get_string('takensessions', 'attendance'); |
|
|
$table->align[] = 'center'; |
|
|
$table->align[] = 'center'; |
|
|
$table->size[] = '1px'; |
|
|
$table->size[] = '1px'; |
|
|
|
|
|
$colclass = empty($colclass) ? 'columncontrast' : null; |
|
|
|
|
|
$table->colclasses[] = $colclass; |
|
|
|
|
|
|
|
|
$table->head[] = get_string('points', 'attendance'); |
|
|
$table->head[] = get_string('points', 'attendance'); |
|
|
$table->align[] = 'center'; |
|
|
$table->align[] = 'center'; |
|
|
$table->size[] = '1px'; |
|
|
$table->size[] = '1px'; |
|
|
|
|
|
$table->colclasses[] = $colclass; |
|
|
|
|
|
|
|
|
$table->head[] = get_string('percentage', 'attendance'); |
|
|
$table->head[] = get_string('percentage', 'attendance'); |
|
|
$table->align[] = 'center'; |
|
|
$table->align[] = 'center'; |
|
|
$table->size[] = '1px'; |
|
|
$table->size[] = '1px'; |
|
|
|
|
|
$table->colclasses[] = $colclass; |
|
|
|
|
|
|
|
|
if ($reportdata->pageparams->view == ATT_VIEW_SUMMARY) { |
|
|
if ($reportdata->pageparams->view == ATT_VIEW_SUMMARY) { |
|
|
$table->head[] = get_string('sessionstotal', 'attendance'); |
|
|
$table->head[] = get_string('sessionstotal', 'attendance'); |
|
|
$table->align[] = 'center'; |
|
|
$table->align[] = 'center'; |
|
|
$table->size[] = '1px'; |
|
|
$table->size[] = '1px'; |
|
|
|
|
|
$colclass = empty($colclass) ? 'columncontrast' : null; |
|
|
|
|
|
$table->colclasses[] = $colclass; |
|
|
|
|
|
|
|
|
$table->head[] = get_string('pointsallsessions', 'attendance'); |
|
|
$table->head[] = get_string('pointsallsessions', 'attendance'); |
|
|
$table->align[] = 'center'; |
|
|
$table->align[] = 'center'; |
|
|
$table->size[] = '1px'; |
|
|
$table->size[] = '1px'; |
|
|
|
|
|
$table->colclasses[] = $colclass; |
|
|
|
|
|
|
|
|
$table->head[] = get_string('percentageallsessions', 'attendance'); |
|
|
$table->head[] = get_string('percentageallsessions', 'attendance'); |
|
|
$table->align[] = 'center'; |
|
|
$table->align[] = 'center'; |
|
|
$table->size[] = '1px'; |
|
|
$table->size[] = '1px'; |
|
|
|
|
|
$table->colclasses[] = $colclass; |
|
|
|
|
|
|
|
|
$table->head[] = get_string('maxpossiblepoints', 'attendance'); |
|
|
$table->head[] = get_string('maxpossiblepoints', 'attendance'); |
|
|
$table->align[] = 'center'; |
|
|
$table->align[] = 'center'; |
|
|
$table->size[] = '1px'; |
|
|
$table->size[] = '1px'; |
|
|
|
|
|
$colclass = empty($colclass) ? 'columncontrast' : null; |
|
|
|
|
|
$table->colclasses[] = $colclass; |
|
|
|
|
|
|
|
|
$table->head[] = get_string('maxpossiblepercentage', 'attendance'); |
|
|
$table->head[] = get_string('maxpossiblepercentage', 'attendance'); |
|
|
$table->align[] = 'center'; |
|
|
$table->align[] = 'center'; |
|
|
$table->size[] = '1px'; |
|
|
$table->size[] = '1px'; |
|
|
|
|
|
$table->colclasses[] = $colclass; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if ($bulkmessagecapability) { // Display the table header for bulk messaging. |
|
|
if ($bulkmessagecapability) { // Display the table header for bulk messaging. |
|
@ -948,6 +977,12 @@ class mod_attendance_renderer extends plugin_renderer_base { |
|
|
} else { |
|
|
} else { |
|
|
$usersummary = $reportdata->summary->get_taken_sessions_summary_for($user->id); |
|
|
$usersummary = $reportdata->summary->get_taken_sessions_summary_for($user->id); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
foreach ($reportdata->statuses AS $sts) { |
|
|
|
|
|
$row->cells[] = isset($usersummary->userstakensessionsbyacronym[$sts->setnumber][$sts->acronym]) ? |
|
|
|
|
|
$usersummary->userstakensessionsbyacronym[$sts->setnumber][$sts->acronym] : 0; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
$row->cells[] = $usersummary->numtakensessions; |
|
|
$row->cells[] = $usersummary->numtakensessions; |
|
|
$row->cells[] = format_float($usersummary->takensessionspoints, 1, true, true) . ' / ' . |
|
|
$row->cells[] = format_float($usersummary->takensessionspoints, 1, true, true) . ' / ' . |
|
|
format_float($usersummary->takensessionsmaxpoints, 1, true, true); |
|
|
format_float($usersummary->takensessionsmaxpoints, 1, true, true); |
|
@ -972,6 +1007,7 @@ class mod_attendance_renderer extends plugin_renderer_base { |
|
|
$table->data[] = $row; |
|
|
$table->data[] = $row; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if ($reportdata->pageparams->view != ATT_VIEW_SUMMARY) { |
|
|
// Calculate the sum of statuses for each user. |
|
|
// Calculate the sum of statuses for each user. |
|
|
$statrow = new html_table_row(); |
|
|
$statrow = new html_table_row(); |
|
|
$statrow->cells[] = ''; |
|
|
$statrow->cells[] = ''; |
|
@ -994,7 +1030,7 @@ class mod_attendance_renderer extends plugin_renderer_base { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
$statsoutput = '<br/>'; |
|
|
$statsoutput = ''; |
|
|
foreach ($sessionstats as $status) { |
|
|
foreach ($sessionstats as $status) { |
|
|
$statsoutput .= "$status->description: {$status->count}<br/>"; |
|
|
$statsoutput .= "$status->description: {$status->count}<br/>"; |
|
|
} |
|
|
} |
|
@ -1002,7 +1038,15 @@ class mod_attendance_renderer extends plugin_renderer_base { |
|
|
$cell->style = 'white-space:nowrap;'; |
|
|
$cell->style = 'white-space:nowrap;'; |
|
|
$statrow->cells[] = $cell; |
|
|
$statrow->cells[] = $cell; |
|
|
} |
|
|
} |
|
|
|
|
|
foreach ($reportdata->statuses AS $sts) { |
|
|
|
|
|
$statrow->cells[] = ''; |
|
|
|
|
|
} |
|
|
|
|
|
$statrow->cells[] = ''; |
|
|
|
|
|
$statrow->cells[] = ''; |
|
|
|
|
|
$statrow->cells[] = ''; |
|
|
|
|
|
$statrow->cells[] = ''; |
|
|
$table->data[] = $statrow; |
|
|
$table->data[] = $statrow; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if ($bulkmessagecapability) { // Require that the user can bulk message users. |
|
|
if ($bulkmessagecapability) { // Require that the user can bulk message users. |
|
|
// Display check boxes that will allow the user to send a message to the students that have been checked. |
|
|
// Display check boxes that will allow the user to send a message to the students that have been checked. |
|
|