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_33_STABLE
Tõnis Tartes 6 years ago
committed by Dan Marsden
parent
commit
dadf8426a4
  1. 4
      renderer.php

4
renderer.php

@ -431,7 +431,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]++;
} }
} }
@ -568,7 +568,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