protected function mark() { $section = $_GET['uid']; $date = NULL; if (isset($_GET['ref'])) { $date = $_GET['ref']; } global $user; global $objPDO; $student = new student($objPDO, $user->getuserId()); $headMenu = array("username" => $student->getName()); if ($user->checkAdmin() == true || $student->checkTeacher()) { include $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/student_section_class.php'; include $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/student_profile_class.php'; include $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/attendence_class.php'; $stusec = new Studentsection($objPDO); $stupro = new StudentProfile($objPDO); $att = new Attendence($objPDO); $stu = $stusec->getBySectionId($section); $students = array(); foreach ($stu as $key => $value) { $stupro->setID($value['student_id']); $stupro->load(); $students[] = $stupro->getAsArray(); } $marked = $att->getBySectionDateArray($section, $date); require_once $_SERVER['DOCUMENT_ROOT'] . '/cloud/view/student_attendence_view.php'; } else { header('Location:http://localhost/cloud'); } }
protected function subjectreportlist() { global $user; global $objPDO; $student = new student($objPDO, $user->getuserId()); $headMenu = array("username" => $student->getName()); if (($user->checkAdmin() == true || $student->checkTeacher()) && isset($_POST['exam_id']) && isset($_POST['section']) && isset($_POST['subject'])) { $role = $student->getacctType(); include $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/student_section_class.php'; include $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/examination_section_subject_class.php'; include $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/marks_splitup_class.php'; include $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/student_profile_class.php'; include $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/exam_marks_class.php'; $rel = new ExaminationSectionSubject($objPDO); $exam_id = $_POST['exam_id']; $section_id = $_POST['section']; $subject_id = $_POST['subject']; $rel->setExaminationId($exam_id); $rel->setSectionId($section_id); $rel->setSubjectId($subject_id); $id = $rel->getIDByElems(); $mark = new ExamMarks($objPDO); $mark_list = $mark->getByExamSubjectId($id); $rel->setID($id); $rel->load(); $total_marks = $rel->getTotalMarks(); $sec = new StudentSection($objPDO); $student = array(); $student = $sec->getBySectionId($section_id); $students = array(); $stupro = new StudentProfile($objPDO); $roll_numbers = array(); foreach ($student as $key => $value) { $stupro->setID($value['student_id']); $stupro->load(); $students[$value['student_id']] = $stupro->getName(); $roll_numbers[$value['student_id']] = $stupro->getRollNo(); } $split = new MarksSplitup($objPDO); $split_ups = $split->getByExamSubjectId($id); include $_SERVER['DOCUMENT_ROOT'] . '/cloud/view/section_subject_report_view.php'; } else { header('Location:http://localhost/cloud'); } }