From b9ed00d3a84aabba7cfa3077ac03a12176275309 Mon Sep 17 00:00:00 2001 From: Joseph Baxter Date: Fri, 6 Jun 2014 09:47:03 +0100 Subject: [PATCH] bug fix for community issue: reportdata session log offset non existant --- renderer.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/renderer.php b/renderer.php index 5194b24..9f43f0d 100644 --- a/renderer.php +++ b/renderer.php @@ -869,7 +869,9 @@ class mod_attendance_renderer extends plugin_renderer_base { foreach ($reportdata->sessions as $sess) { foreach ($reportdata->users as $user) { foreach($reportdata->statuses as $status) { - if ($reportdata->sessionslog[$user->id][$sess->id]->statusid == $status->id) $sessionstats[$status->id]++; + if (!empty($reportdata->sessionslog[$user->id][$sess->id])) { + if ($reportdata->sessionslog[$user->id][$sess->id]->statusid == $status->id) $sessionstats[$status->id]++; + } } }