Browse Source

ISSUE-336 - Viewing single session table total counts in also users w… (#337)

* ISSUE-336 - Viewing single session table total counts in also users who are unenrolled from course
MOODLE_32_STABLE
Tõnis Tartes 6 years ago
committed by Dan Marsden
parent
commit
90648f0797
  1. 4
      renderer.php

4
renderer.php

@ -430,7 +430,7 @@ class mod_attendance_renderer extends plugin_renderer_base {
$sessionstats[] = array(); $sessionstats[] = array();
foreach ($takedata->sessionlog as $userlog) { foreach ($takedata->sessionlog as $userlog) {
foreach ($takedata->statuses as $status) { foreach ($takedata->statuses as $status) {
if ($userlog->statusid == $status->id) { if ($userlog->statusid == $status->id && in_array($userlog->studentid, array_keys($takedata->users))) {
$sessionstats[$status->id]++; $sessionstats[$status->id]++;
} }
} }
@ -567,7 +567,7 @@ class mod_attendance_renderer extends plugin_renderer_base {
$controls .= $this->output->render($select); $controls .= $this->output->render($select);
} }
if (count($takedata->sessions4copy) > 0) { if (isset($takedata->sessions4copy) && count($takedata->sessions4copy) > 0) {
$controls .= html_writer::empty_tag('br'); $controls .= html_writer::empty_tag('br');
$controls .= html_writer::empty_tag('br'); $controls .= html_writer::empty_tag('br');

Loading…
Cancel
Save