From bedf13b2bd8f46eebf190448735d07883360d56e Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Fri, 22 Dec 2017 13:45:09 +0530 Subject: [PATCH] course details changes done --- .../controllers/StudentView_Controller.php | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 Apollo/api/application/controllers/StudentView_Controller.php diff --git a/Apollo/api/application/controllers/StudentView_Controller.php b/Apollo/api/application/controllers/StudentView_Controller.php new file mode 100644 index 00000000..687cea79 --- /dev/null +++ b/Apollo/api/application/controllers/StudentView_Controller.php @@ -0,0 +1,62 @@ +methods['getStudentInfo_post']['limit'] = 500; + // load the employee model + $this->load->model('Studentview_model', 'studentview_model'); + + } + + /* + *get student basic info + * created by kms + * */ + public function getStudentInfo_post() + { + $requestedBy = $this->post('requestedBy'); + + $studentListDetails = $this->studentview_model->getStudentInfo($requestedBy);// Check if the employee exist + if ($studentListDetails) { + $studentListDetails['status'] = REST_Controller::HTTP_OK; + // Set the response and exit + $this->response($studentListDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code + } else { + // Set the response and exit + $this->response([ + 'message' => 'No users were found', + 'status' => REST_Controller::HTTP_NOT_FOUND + ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code + } + + } +}