<tr> <td id="mailmsg" class="msgbox" colspan="2"> </td> </tr> </table> <?php } else { ?> </table> <?php } ?> <?php } else { if ($_GET['view'] == 2) { $class = new DGradeClass($user->get_classid()); $data = array(); $longest = 0; $userid = $user->get_uid(); $canwritebase = $user->get_level() == 0 || $class->get_tutorid() == $user->get_uid(); foreach ($class->students as $st) { $info = $class->get_student_brief($st); $student = new DGradeStudent($st); $rec = $student->get_subject_grades($_GET['id'], $_GET['semid']); $rec['grades'] = explode(',', $rec['grades']); $cnt = count($rec['grades']); if ($cnt > $longest) { $longest = $cnt; } $rec['student_id'] = $info['id']; $rec['info'] = $info['name'] . ' ' . $info['surname'];