Exemplo n.º 1
0
 public function send__sms_student()
 {
     $data = array();
     $filterColumns = array();
     $offset = NULL;
     $limit = NULL;
     $sort = array();
     $session_Id = NULL;
     $class_section_Id = NULL;
     $this->template->getHeader();
     $this->template->getLeftbar();
     $data['session'] = retrieve_records($filterColumns = NULL, $offset = NULL, $limit = NULL, $sort = NULL, "ems_session");
     $data['classSecton'] = getClass_section();
     if ($this->input->post('session_id')) {
         $session_Id = (int) $this->input->post('session_id');
         $filterColumns['session_id'] = $session_Id;
     }
     if ($this->input->post('class_section_id')) {
         $class_section_Id = (int) $this->input->post('class_section_id');
         $filterColumns['class_section_id'] = $class_section_Id;
     }
     if ($session_Id == 0 && $class_section_Id == 0) {
         $data['studentListForSendSms'] = getStudentBySessionId_ClassSectionId($filterColumns, $offset, $limit, $sort);
     } else {
         $data['studentListForSendSms'] = getStudentBySessionId_ClassSectionId($filterColumns, $offset, $limit, $sort);
     }
     $this->load->view('student/sms/studentlist_for_sms', $data);
     $this->template->getFooter();
 }
Exemplo n.º 2
0
 public function student_list($class_section_id = "", $session_id = "")
 {
     $data = array();
     $filterColumns = array();
     $offset = NULL;
     $limit = NULL;
     $sort = array();
     $session_Id = NULL;
     $class_section_Id = NULL;
     $this->template->getScript();
     $this->template->getAdminHeader();
     $this->template->getAdminLeftBar();
     $data['session'] = retrieve_records($filterColumns = NULL, $offset = NULL, $limit = NULL, $sort = NULL, "ems_session");
     $data['classSecton'] = getClass_section();
     $data['session_id'] = 0;
     $data['class_section_id'] = 0;
     $data['approvemsg'] = "";
     $data['apprrove'] = 0;
     $data['StudentAttendance'] = array();
     $data['studentListForSendSms'] = array();
     if ($this->input->post('session_id') > 0) {
         $session_Id = (int) $this->input->post('session_id');
         $filterColumns['session_id'] = $session_Id;
         $data['session_id'] = $session_Id;
     }
     if ($this->input->post('class_section_id') > 0) {
         $class_section_id = (int) $this->input->post('class_section_id');
         $filterColumns['class_section_id'] = $class_section_id;
         $data['class_section_id'] = $class_section_id;
     }
     if ($session_Id > 0 and $class_section_id > 0) {
         $recordsFound = getStudentBySessionId_ClassSectionId($filterColumns, $offset, $limit, $sort);
         $data['studentListForSendSms'] = $recordsFound;
     }
     $this->load->view('student_menu/student_list', $data);
     $this->template->getFooter();
 }
Exemplo n.º 3
0
 public function teachertimetable()
 {
     $teacgerDetail = $this->session->userdata('teacher');
     $data = array();
     $this->template->getScript();
     $this->template->getTeacherHeader();
     $this->template->getTeacherLeftBar();
     $currentSession = $this->sessionModel->getCurrent_Session();
     $data['session_id'] = $currentSession[0]->session_id;
     $currentSeason = $this->seasonModel->getCurrent_season($currentSession[0]->session_id);
     $data['season_id'] = $currentSeason[0]->season_id;
     $periodfilterColumns = array('session_id' => $data['session_id'], 'season_id' => $data['season_id']);
     $period = retrieve_records($periodfilterColumns, $offset = NULL, $limit = NULL, $sort = NULL, "ems_period_time");
     $periodArray = array();
     if (!isset($period['status'])) {
         foreach ($period as $period) {
             $filterColumns = array('period_id' => $period->period_id, 'session_id' => $data['session_id'], 'season_id' => $data['season_id'], 'teacher_id' => $teacgerDetail['staff_id']);
             $dailtTimeTable = retrieve_records($filterColumns, $offset = NULL, $limit = NULL, $sort = NULL, "ems_daily_timetable");
             $weekDayArray = array();
             if (!isset($dailtTimeTable['status'])) {
                 $weekDayArray = array();
                 foreach ($dailtTimeTable as $dailyRow) {
                     $TfilterColumns = array('school_user_type_id' => 1, 'staff_id' => $dailyRow->teacher_id);
                     $teachetData = retrieve_records($TfilterColumns, $offset = NULL, $limit = NULL, $sort = NULL, "ems_staff");
                     $teacherName = "";
                     $teacherName = $teachetData[0]->first_name;
                     if ($teachetData[0]->first_name) {
                         $teacherName = $teacherName . " " . $teachetData[0]->middle_name;
                     }
                     if ($teachetData[0]->first_name) {
                         $teacherName = $teacherName . " " . $teachetData[0]->last_name;
                     }
                     $PfilterColumns = array('paper_id' => $dailyRow->paper_id);
                     $paperData = retrieve_records($PfilterColumns, $offset = NULL, $limit = NULL, $sort = NULL, "ems_paper");
                     $paperName = "";
                     $paperName = $paperData[0]->paper_name;
                     $ClassSection = getClass_section($dailyRow->class_section_id);
                     $weekDayArray[$dailyRow->week_day] = array('class_section' => $ClassSection[0]->class_name . '-' . $ClassSection[0]->section_name, 'start_time' => $period->start_time, 'end_time' => $period->end_time, 'teacherName' => $teacherName, 'teacher_id' => $dailyRow->teacher_id, 'paperName' => $paperName, 'paper_id' => $paperData[0]->paper_id, 'daily_timetable_id' => $dailyRow->daily_timetable_id);
                 }
             }
             $periodArray[$period->period_num . '-' . $period->period_id . '-' . $period->start_time . '-' . $period->end_time] = $weekDayArray;
         }
     }
     $data['period'] = $periodArray;
     $this->load->view('timetable/student_daily_timetable', $data);
     $this->template->getFooter();
 }
 public function approve_attendance()
 {
     $data = array();
     $filterColumns = array();
     $offset = NULL;
     $limit = NULL;
     $sort = array();
     $session_Id = NULL;
     $class_section_Id = NULL;
     $this->template->getScript();
     $this->template->getAdminHeader();
     $this->template->getAdminLeftBar();
     $data['session'] = retrieve_records($filterColumns = NULL, $offset = NULL, $limit = NULL, $sort = NULL, "ems_session");
     $data['classSecton'] = getClass_section();
     $data['session_id'] = 0;
     $data['class_section_id'] = 0;
     $data['approvemsg'] = "";
     $data['apprrove'] = 0;
     $data['StudentAttendance'] = array();
     $data['studentListForSendSms'] = array();
     if ($this->input->post('session_id')) {
         $session_Id = (int) $this->input->post('session_id');
         $filterColumns['session_id'] = $session_Id;
         $data['session_id'] = $session_Id;
     }
     if ($this->input->post('class_section_id')) {
         $class_section_Id = (int) $this->input->post('class_section_id');
         $filterColumns['class_section_id'] = $class_section_Id;
         $data['class_section_id'] = $class_section_Id;
     }
     if ($this->input->post('session_id') > 0 and $this->input->post('class_section_id') > 0) {
         $recordsFound = getStudentBySessionId_ClassSectionId($filterColumns, $offset, $limit, $sort);
         $data['studentListForSendSms'] = $recordsFound;
         if (isset($recordsFound['result'])) {
         } else {
             $studentListForSendSms = $data['studentListForSendSms'];
             $student_teacher_class_id = array();
             for ($i = 0; $i < count($studentListForSendSms); $i++) {
                 $student_teacher_class_id[] = $studentListForSendSms[$i]->student_teacher_class_id;
             }
             $totalApprove = $this->attendanceModel->checkStudentAttendanceApprove($student_teacher_class_id, date('Y-m-d'));
             if ($totalApprove > 0) {
                 $data['approvemsg'] = "Attendance already approved";
                 $data['apprrove'] = 1;
             }
             $data['StudentAttendance'] = $this->attendanceModel->getStudentAttendance($student_teacher_class_id, date('Y-m-d'));
         }
     }
     $this->load->view('attendance/student_attendance_approve', $data);
     $this->template->getFooter();
 }