diff --git a/Apollo/api/application/controllers/Course_Controller.php b/Apollo/api/application/controllers/Course_Controller.php index fc35a4d3..b7cf973a 100755 --- a/Apollo/api/application/controllers/Course_Controller.php +++ b/Apollo/api/application/controllers/Course_Controller.php @@ -38,6 +38,7 @@ class Course_Controller extends REST_Controller { $details['UniversityID'] = $this->post('universityName'); $details['Specilization1'] = $this->post('specilization1'); $details['Specilization2'] = $this->post('specilization2'); + $details['BranchCode'] = $this->post('branchCode'); //$details['FeesType'] = $this->post('feesType'); $details['PC'] = $this->post('provFess'); @@ -59,9 +60,9 @@ class Course_Controller extends REST_Controller { array_push($jsonSemFeesData,$jsonLateralFeesData); } // get subject details - $subjectDetails=$this->post('subjects'); + //$subjectDetails=$this->post('subjects'); - $courseDetails = $this->course_model->addCourse($details,$jsonSemFeesData,$subjectDetails);// Check if the users data store contains users (in case the database result returns NULL) + $courseDetails = $this->course_model->addCourse($details,$jsonSemFeesData);// $subjectDetails Check if the users data store contains users (in case the database result returns NULL) if ($courseDetails) { $courseDetails['status'] = REST_Controller::HTTP_OK; @@ -86,7 +87,8 @@ class Course_Controller extends REST_Controller { public function getCourseDetails_post() { $requestedBy = $this->post('requestedBy'); - $getCourse = $this->course_model->getCourse($requestedBy); + $branchCode = $this->post('branchCode'); + $getCourse = $this->course_model->getCourse($requestedBy,$branchCode); if ($getCourse) { @@ -108,7 +110,8 @@ class Course_Controller extends REST_Controller { public function getCourseUnivFeesDetails_post() { $requestedBy = $this->post('requestedBy'); - $getCourseUnivFee = $this->course_model->getCourseUnivFeesTypes($requestedBy); + $branchCode = $this->post('branchCode'); + $getCourseUnivFee = $this->course_model->getCourseUnivFeesTypes($requestedBy,$branchCode); if ($getCourseUnivFee) { @@ -148,6 +151,7 @@ class Course_Controller extends REST_Controller { $details['OtherFees'] = $this->post('otherAmount'); $details['UpdatedBy'] = $this->post('updatedBy'); $details['UpdatedOn'] = $now->format('Y-m-d H:i:s'); + $details['BranchCode'] = $this->post('branchCode'); $existCourseID = $this->post('existCourseID'); $jsonRegularFeesData=$this->post('regularFeesAmounts'); $jsonLateralFeesData=$this->post('lateralFeesAmounts'); @@ -163,13 +167,14 @@ class Course_Controller extends REST_Controller { } // update course subject details - $subjectDetails['UniversityID'] = $this->post('universityID'); + /* $subjectDetails['UniversityID'] = $this->post('universityID'); $subjectDetails['CourseID'] = $this->post('courseID'); $subjectDetails['Subjects'] = $this->post('subjects'); $subjectDetails['UpdatedBy'] = $this->post('updatedBy'); - $subjectDetails['UpdatedOn'] = $now->format('Y-m-d H:i:s'); + $subjectDetails['UpdatedOn'] = $now->format('Y-m-d H:i:s');*/ - $updateDetails = $this->course_model->updateCourse($details,$jsonSemFeesData,$subjectDetails);// Check if the users data store contains users (in case the database result returns NULL) + + $updateDetails = $this->course_model->updateCourse($details,$jsonSemFeesData);// $subjectDetails Check if the users data store contains users (in case the database result returns NULL) if ($updateDetails) { $updateDetails['status'] = REST_Controller::HTTP_OK;