diff --git a/Apollo/api/application/config/constants.php b/Apollo/api/application/config/constants.php index 780ff423..1ae3e72d 100755 --- a/Apollo/api/application/config/constants.php +++ b/Apollo/api/application/config/constants.php @@ -159,6 +159,7 @@ defined('SESSIONSCHEDULEDETAILS') OR define('SESSIONSCHEDULEDETAILS','T_SessionS defined('STUDENTDOCUMENTDETAILS') OR define('STUDENTDOCUMENTDETAILS','T_StudentDocumentsDetails'); defined('STUDENTDOCUMENTTRACKDETAILS') OR define('STUDENTDOCUMENTTRACKDETAILS','T_Student_DocumentTrack_Details'); defined('REGISTRATIONDETAILS') OR define('REGISTRATIONDETAILS','T_Registration_Details'); +defined('ENROLMENTRECEIVEDFROMUNIV') OR define('ENROLMENTRECEIVEDFROMUNIV','T_Enrolment_Received_From_University'); // define APPLICATION certificate type constant diff --git a/Apollo/api/application/config/routes.php b/Apollo/api/application/config/routes.php index 152de088..9761cad7 100755 --- a/Apollo/api/application/config/routes.php +++ b/Apollo/api/application/config/routes.php @@ -340,4 +340,7 @@ $route['insertUniversityfile'] = 'UniversityFile_Controller/insertUniversityfile //Application Form Details $route['getApplicationFromDetails'] = 'StatusUpdation_Controller/getApplicationFromDetails'; $route['updateApplicationFormStatus'] = 'StatusUpdation_Controller/updateApplicationFormStatus'; -$route['getApplicationFormStatusList'] = 'StatusUpdation_Controller/getApplicationFormStatusList'; \ No newline at end of file +$route['getApplicationFormStatusList'] = 'StatusUpdation_Controller/getApplicationFormStatusList'; + +// update university enrolment and fees details received +$route['receiveEnrolmentFromUniv'] = 'Receive_Enrolment_Fees_Univ_Controller/receiveEnrolmentFromUniv'; diff --git a/Apollo/api/application/controllers/Receive_Enrolment_Fees_Univ_Controller.php b/Apollo/api/application/controllers/Receive_Enrolment_Fees_Univ_Controller.php new file mode 100644 index 00000000..a8055856 --- /dev/null +++ b/Apollo/api/application/controllers/Receive_Enrolment_Fees_Univ_Controller.php @@ -0,0 +1,69 @@ +methods['receiveEnrolmentFromUniv_post']['limit'] = 500; // 500 requests per hour per user/key + // load the model + $this->load->model('Receive_Enrolment_Fees_Univ_model', 'receive_model'); + + } + + /* + * This method used to add received enrolment details + * created by kms + * */ + + public function receiveEnrolmentFromUniv_post() + { + $enrolmentDetails = $this->post('details'); + $localDetails = $this->post('localDetails'); + $updatedDetails = $this->receive_model->updateEnrolmentDetails($enrolmentDetails,$localDetails);// Check if the users data store contains users (in case the database result returns NULL) + if ($updatedDetails) + { + $updatedDetails['status'] = REST_Controller::HTTP_OK; + // Set the response and exit + $this->response($updatedDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code + } + else + { + // Set the response and exit + $this->response([ + 'message' => 'Something went wrong.please try again!', + 'status' => REST_Controller::HTTP_NOT_FOUND + ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code + } + + + } + + +} \ No newline at end of file diff --git a/Apollo/api/application/models/Receive_Enrolment_Fees_Univ_model.php b/Apollo/api/application/models/Receive_Enrolment_Fees_Univ_model.php new file mode 100644 index 00000000..8d9c2cbe --- /dev/null +++ b/Apollo/api/application/models/Receive_Enrolment_Fees_Univ_model.php @@ -0,0 +1,59 @@ +db->select('STC.BranchID,US.UniversityID,US.UniversityName'); + $this->db->from(STUDENTCOURSE.' as STC'); + $this->db->join(UNIVERSITY.' as US', 'US.UniversityID = STC.UniversityID AND US.BranchCode = STC.BranchID'); + $this->db->where('STC.EnrollmentID',$checkRow['Enrollment_No']); + $studentCourseDetails = $this->db->get()->first_row(); + if($studentCourseDetails){ + } + else{ + $error["StudentName"]=$checkRow['Student_Name']; + $error["Message"]="Enrolment number is not exist in student course details."; + $errorArray[]=$error; + + } + + } + else{ + // for capture error message + $error["StudentName"]=$checkRow['Student_Name']; + $error["Message"]="Enrolment number/Form id is not exist."; + $errorArray[]=$error; + } + print_r($errorArray); + + } +die(); + return false; + } + + + +} \ No newline at end of file