From a772f82c6da68df8b04134db93ab6484a91cd34f Mon Sep 17 00:00:00 2001 From: Artem Andreev Date: Fri, 21 Jan 2011 14:34:00 +0300 Subject: [PATCH] Fixed warning for group sessions for students which are not member of any group --- report.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/report.php b/report.php index 9090e03..098f260 100644 --- a/report.php +++ b/report.php @@ -165,12 +165,15 @@ $table->data[$student->id][] = ''.$allstatuses[$att->statusid]->acronym.''; } } else { - if ($sessdata->groupid && !array_key_exists($sessdata->groupid, $studgroups)) + if (!$studgroups || $sessdata->groupid && !array_key_exists($sessdata->groupid, $studgroups)) + // student is not memeber of any group OR it is session of other group $table->data[$student->id][] = ''; else if($sessdata->lasttaken > 0) { + // student began to study in the group later this session $table->data[$student->id][] = '–'; } else { + // no attendance data for session $table->data[$student->id][] = '?'; } }