changes in course
This commit is contained in:
parent
cc9685f39e
commit
b0bfc317ab
@ -31,13 +31,22 @@ class Course_Controller extends REST_Controller {
|
||||
|
||||
public function addCourseDetails_post()
|
||||
{
|
||||
|
||||
$now = new DateTime();
|
||||
$now->setTimezone(new DateTimezone('Asia/Kolkata'));
|
||||
$details['CourseID'] = $this->post('courseID');
|
||||
$details['CourseName'] = $this->post('courseName');
|
||||
$details['UniversityID'] = $this->post('universityName');
|
||||
$details['FeesType'] = $this->post('feesType');
|
||||
$details['PC'] = $this->post('provFess');
|
||||
$details['DC'] = $this->post('degreeAmount');
|
||||
$details['TC'] = $this->post('transferAmount');
|
||||
$details['MC'] = $this->post('migrationAmount');
|
||||
$details['OtherFees'] = $this->post('otherAmount');
|
||||
$details['CreatedBy'] = $this->post('createdBy');
|
||||
$details['CreatedOn'] = $now->format('Y-m-d H:i:s');
|
||||
$details['IsActive'] = $this->post('status');
|
||||
$courseDetails = $this->course_model->addCourse($details);// Check if the users data store contains users (in case the database result returns NULL)
|
||||
$jsonFeesData=$this->post('feesAmounts');
|
||||
$courseDetails = $this->course_model->addCourse($details,$jsonFeesData);// Check if the users data store contains users (in case the database result returns NULL)
|
||||
if ($courseDetails)
|
||||
{
|
||||
$courseDetails['status'] = REST_Controller::HTTP_OK;
|
||||
@ -87,12 +96,20 @@ class Course_Controller extends REST_Controller {
|
||||
* */
|
||||
public function updateCourseDetails_post()
|
||||
{
|
||||
$now = new DateTime();
|
||||
$now->setTimezone(new DateTimezone('Asia/Kolkata'));
|
||||
$details['CourseID'] = $this->post('courseCode');
|
||||
$details['CourseName'] = $this->post('courseName');
|
||||
$details['IsActive'] = $this->post('status');
|
||||
$details['PC'] = $this->post('provFess');
|
||||
$details['DC'] = $this->post('degreeAmount');
|
||||
$details['TC'] = $this->post('transferAmount');
|
||||
$details['MC'] = $this->post('migrationAmount');
|
||||
$details['OtherFees'] = $this->post('otherAmount');
|
||||
$details['UpdatedBy'] = $this->post('updatedBy');
|
||||
$details['UpdatedOn'] = date("Y-m-d", time());
|
||||
$updateDetails = $this->course_model->updateCourse($details);// Check if the users data store contains users (in case the database result returns NULL)
|
||||
$details['UpdatedOn'] = $now->format('Y-m-d H:i:s');
|
||||
$jsonFeesData=$this->post('feesAmounts');
|
||||
$updateDetails = $this->course_model->updateCourse($details,$jsonFeesData);// Check if the users data store contains users (in case the database result returns NULL)
|
||||
if ($updateDetails)
|
||||
{
|
||||
$updateDetails['status'] = REST_Controller::HTTP_OK;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user