methods['getCourseSubjectDetails_post']['limit'] = 500; // 500 requests per hour per user/key $this->methods['getUniversityCourseDetails_post']['limit'] = 500; // 500 requests per hour per user/key $this->methods['updateSheduleDetails_post']['limit'] = 500; // 500 requests per hour per user/key // load the model $this->load->model('Hallticket_model', 'Hallticket_model'); } /* * get university and course details for semester course mappinig * created by velz * */ public function getUniversityCourseDetails_post() { $branchId = $this->post('branchId'); $getUnivDetails = $this->Hallticket_model->getUniversityDetails($branchId); $getCenterDetails = $this->Hallticket_model->getCenterDetails($branchId); if ($getUnivDetails) { $getUnivDetails['status'] = REST_Controller::HTTP_OK; // Set the response and exit $this->response($getUnivDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code } else { // Set the response and exit $this->response([ 'message' => 'No records found!', 'status' => REST_Controller::HTTP_NOT_FOUND ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code } } /* * get shedule time and date from T_Batch_Schedule_Child * created by TamilBala * */ public function getSheduleDetails_post() { $mapid = $this->post('mapid'); $subid = $this->post('subid'); $branchcode = $this->post('branchcode'); //$getSheduleData = $this->Hallticket_model->getShedules($mapid); $get_unShedules = $this->Hallticket_model->get_unShedules($mapid,$subid,$branchcode); //print_r($get_unShedules); if ($get_unShedules) { //echo "model"; $getSheduleinfo['status'] = REST_Controller::HTTP_OK; $getSheduleinfo['getunSheduleDetailsinfo']=$get_unShedules; //print_r($getSheduleinfo['getunSheduleDetailsinfo']); // Set the response and exit $this->response($getSheduleinfo, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code } else { // Set the response and exit $this->response([ 'message' => 'No records found!', 'status' => REST_Controller::HTTP_NOT_FOUND ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code } } /* * get universityid and courseid details for Shedule view * created by TamilBala * */ public function getUniversityCourseId_post() { $branchCode = $this->post('branchCode'); //print_r($branchCode); $getUnivDetailsid = $this->Hallticket_model->getUniversityid($branchCode); if ($getUnivDetailsid) { $getUnivinfo['status'] = REST_Controller::HTTP_OK; $getUnivinfo['getUnivDetailsinfo'] = $getUnivDetailsid; // Set the response and exit $this->response($getUnivinfo, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code } else { // Set the response and exit $this->response([ 'message' => 'No records found!', 'status' => REST_Controller::HTTP_NOT_FOUND ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code } } /* * get semester and subjects list for sem course mapping * created by velz * */ public function getSemesterSubjectDetails_post() { $universityID = $this->post('universityID'); $courseIDS = $this->post('courseID'); $requestedBy = $this->post('requestedBy'); $branchId = $this->post('branchId'); $tempCourseArray = array(); foreach($courseIDS as $val) { foreach($val as $v){ $tempCourseArray[] = $v; } //print_r($value); } $data['subjectDetails'] = $this->Hallticket_model->getSubjectDetails($universityID,$tempCourseArray,$branchId); //$data['semesterDetails'] = $this->Hallticket_model->getSemesterDetails($universityID,$tempCourseArray); if($data['subjectDetails']) { $data['status'] = REST_Controller::HTTP_OK; // Set the response and exit $this->response($data, REST_Controller::HTTP_OK); } else{ $this->response([ 'message' => 'No records found!', 'status' => REST_Controller::HTTP_NOT_FOUND ], REST_Controller::HTTP_NOT_FOUND); } } public function getBatchAndCenterDetails_post() { $requestedBy = $this->post('requestedBy'); $branchId = $this->post('branchId'); $result = $this->Hallticket_model->getBatchAndCenterDetailsModel($branchId); //print_r($result['batchDetails']);die(); if(!empty($result['batchDetails']) && !empty($result['centerDetails'])) { $data['status'] = REST_Controller::HTTP_OK; $data['batchDetails'] = $result['batchDetails']; $data['centerDetails'] = $result['centerDetails']; $this->response($data, REST_Controller::HTTP_OK); } else { $this->response([ 'message' => 'Batch OR Center Details Not Available', 'status' => REST_Controller::HTTP_NOT_FOUND ], REST_Controller::HTTP_NOT_FOUND); } } public function getStudentDetailsForExamAttendance_post() { $requestedBy = $this->post('requestedBy'); $branchId = $this->post('branchId'); $centerName = $this->post('centerName'); $examDate = $this->post('examDate'); //$examDate = strtotime($examDate); $examDate = date_create($examDate); $examDate = date_format(date_add($examDate,date_interval_create_from_date_string("1 days")),'Y-m-d'); $batch = $this->post('batch'); //echo $examDate; $universityID = $this->post('university'); //print_r($universityID);die(); $result = $this->Hallticket_model->getExamAttendance_model($universityID['universityID'],$branchId,$centerName,$examDate,$batch); if($result) { $data['status'] = REST_Controller::HTTP_OK; $data['studentDetails'] = $result; $this->response($data, REST_Controller::HTTP_OK); } else { $this->response([ 'message' => 'No Data Found', 'status' => REST_Controller::HTTP_NOT_FOUND ], REST_Controller::HTTP_NOT_FOUND); } } public function saveAllSemesterSubjectMapping_post() { $UID = $this->post('universityID'); $courseIDS = $this->post('courseID'); $requestedBy = $this->post('requestedBy'); $branchId = $this->post('branchId'); $semArray = $this->post('Semesters'); $res = $this->Hallticket_model->saveAllSemesterSubjectMappingmodel($UID,$courseIDS,$requestedBy,$branchId,$semArray,$requestedBy); if($res['insert'] == true and $res['exist'] == false) { $data['status'] = REST_Controller::HTTP_OK; $data['txtStatus'] = '1'; $this->response($data, REST_Controller::HTTP_OK); } else if($res['insert'] == false and $res['exist'] == true) { $data['status'] = REST_Controller::HTTP_OK; $data['txtStatus'] = '2'; $this->response($data, REST_Controller::HTTP_OK); } else if($res['insert'] == false and $res['exist'] == false) { $this->response([ 'message' => 'Something Went Wrong!', 'status' => REST_Controller::HTTP_NOT_FOUND ], REST_Controller::HTTP_NOT_FOUND); } } public function SaveAllBatchSchedule_post() { $detailArray = $this->post('scheduleDetails'); $university =$this->post('getuniversityid'); $courseid= $this->post('getcourseid'); $requestedBy = $this->post('requestedBy'); $branchId = $this->post('branchId'); $Cdate = new DateTime('now',new DateTimeZone('Asia/Kolkata')); $CreatedOn = $Cdate->format('Y-m-d H:i:s'); //echo $courseid; $CourseDatialArray = $this->post('courseDetails'); foreach($CourseDatialArray as $coursedetails) { $course=$coursedetails; $schedulemaster = array('UniversityID'=>$university,'CourseID'=>$course,'BranchCode'=>$branchId,'CreatedBy'=>$requestedBy,'CreatedOn'=>$CreatedOn); $schedulemasteradd = $this->Hallticket_model->AddBatchScheduleMaster($schedulemaster,$detailArray); } //print_r($CourseDatialArray); // echo $courseIDS.'-'.$UniversityID; $SchId = ''; if(count($schedulemasteradd)>0) { $SchId = $schedulemasteradd[0]['SchId']; } if((count($schedulemasteradd)>0)) { $data['status'] = REST_Controller::HTTP_OK; // Set the response and exit $this->response($data, REST_Controller::HTTP_OK); } else { $this->response([ 'message' => 'No records found!', 'status' => REST_Controller::HTTP_NOT_FOUND ], REST_Controller::HTTP_NOT_FOUND); } } public function updateSheduleDetails_post() { $schedulearray = $this->post('updatescheduledetails'); $updateBy = $this->post('createdBy'); $scheduleID = $this->post('scheduleID'); $res = $this->Hallticket_model->scheduleUpdate($schedulearray,$updateBy,$scheduleID); if(count($res) > 0 ) { //$data['semsubstatus'] = true; $data['status'] = REST_Controller::HTTP_OK;; //$data['semsubjects'] = $res; $this->response($data, REST_Controller::HTTP_OK); } else { $this->response([ 'message' => 'Something Went Wrong!', 'status' => REST_Controller::HTTP_NOT_FOUND ], REST_Controller::HTTP_NOT_FOUND); } } public function getAllSemesterSubjects_get() { $branchId = $this->post('branchId'); $res = $this->Hallticket_model->getAllSemesterSubjectsmodel($branchId); //$result_array = array(); if(count($res) > 0 ) { $data['semsubstatus'] = true; $data['status'] = REST_Controller::HTTP_OK;; $data['semsubjects'] = $res; $this->response($data, REST_Controller::HTTP_OK); } else { $this->response([ 'message' => 'Something Went Wrong!', 'status' => REST_Controller::HTTP_NOT_FOUND ], REST_Controller::HTTP_NOT_FOUND); } } public function getIndividualCourseSemMappingDetails_post() { $universityID = $this->post('universityID'); $courseID = $this->post('courseID'); $branchId = $this->post('branchId'); $res = $this->Hallticket_model->getIndividualCourseSemMappingDetailsmodel($universityID,$courseID,$branchId); //print_r($res); if(count($res['mappedSubjects']) == 0) { $data['subjectStatus'] = false; $data['status'] = REST_Controller::HTTP_OK; $data['subjects'] = ""; $this->response($data, REST_Controller::HTTP_OK); } else { $data['subjectStatus'] = true; $data['status'] = REST_Controller::HTTP_OK; $data['subjects'] = $res['mappedSubjects']; $data['overAllSubjects'] = $res['overAllSubjects']; $this->response($data, REST_Controller::HTTP_OK); } } public function updateAllSemesterSubjectMapping_post() { $UID = $this->post('universityID'); $courseIDS = $this->post('courseID'); $requestedBy = $this->post('requestedBy'); $branchId = $this->post('branchId'); $semArray = $this->post('Semesters'); $res = $this->Hallticket_model->updateAllSemesterSubjectMappingmodel($UID,$courseIDS,$requestedBy,$branchId,$semArray,$requestedBy); if($res) { $data['status'] = REST_Controller::HTTP_OK; $data['txtStatus'] = true; $this->response($data, REST_Controller::HTTP_OK); } else { $this->response([ 'message' => 'Something Went Wrong!', 'status' => REST_Controller::HTTP_NOT_FOUND ], REST_Controller::HTTP_NOT_FOUND); } } public function getStudentListForHallTicket_post() { $UID = $this->post('university'); $courseID = $this->post('course'); $batch = $this->post('batch'); $requestedBy = $this->post('requestedBy'); $branchId = $this->post('branchId'); $center = $this->post('center'); //print_r($center);die(); $res = $this->Hallticket_model->getStudentListForHallTicketmodel($UID,$courseID,$batch,$requestedBy,$branchId,$center); // echo "CON"; // print_r($res);die(); if(count($res) > 0) { $data['status'] = REST_Controller::HTTP_OK; $data['studentStatus'] = true; $data['studentDetails'] = $res; $this->response($data, REST_Controller::HTTP_OK); } else { $this->response([ 'message' => 'Something Went Wrong!', 'status' => REST_Controller::HTTP_NOT_FOUND ], REST_Controller::HTTP_NOT_FOUND); } } public function getHallTicket_post() { $UID = $this->post('universityID'); $courseID = $this->post('courseID'); $batch = $this->post('batchName'); $requestedBy = $this->post('requestedBy'); $branchId = $this->post('branchId'); $studentIDs = $this->post('StudentIDs'); $centerName = $this->post('centerName'); $res['UniversityDetails'] = $this->Hallticket_model->getUniversityDetials($UID,$branchId); $res['studentDetails'] = $this->Hallticket_model->getStudentDetails($UID,$courseID,$branchId,$studentIDs,$centerName,$batch,$requestedBy); if(count($res['UniversityDetails']) != 0 || count($res['studentDetails']) != 0 ) { $data['status'] = REST_Controller::HTTP_OK; $data['hallTicketStatus'] = true; $data['hallTicketData'] = $res; $data['semDataType'] = $res['studentDetails']['NUMTYPE']; $this->response($data, REST_Controller::HTTP_OK); } else { $this->response([ 'message' => 'Something Went Wrong!', 'status' => REST_Controller::HTTP_NOT_FOUND ], REST_Controller::HTTP_NOT_FOUND); } } }