Fixed warning for group sessions for students which are not member of any group
authorArtem Andreev <andreev.artem@gmail.com>
Fri, 21 Jan 2011 11:34:00 +0000 (14:34 +0300)
committerArtem Andreev <andreev.artem@gmail.com>
Fri, 21 Jan 2011 11:34:00 +0000 (14:34 +0300)
report.php

index 5141999..c37a66d 100644 (file)
                                                        $table->data[$student->id][] = '<font color="red"><b>'.$allstatuses[$att->statusid]->acronym.'</b></font>';
                                                }
                                        } 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][] = '?';
                             }
                                        }