course details changes done

This commit is contained in:
gandhimathi 2018-01-08 11:56:47 +05:30
parent d609bc9ae9
commit 53347d197b

View File

@ -49,8 +49,12 @@ class Course_Controller extends REST_Controller {
$jsonLateralFeesData=$this->post('lateralFeesAmounts');
$jsonSemFeesData=$this->post('semFeesAmounts');
// push regular,lateral fees into same array
array_push($jsonSemFeesData,$jsonRegularFeesData);
array_push($jsonSemFeesData,$jsonLateralFeesData);
if($jsonRegularFeesData['FeesAmount'] != 0 AND $jsonRegularFeesData['FeesAmount'] != '' AND $jsonRegularFeesData['FeesAmount'] != 'undefined'){
array_push($jsonSemFeesData,$jsonRegularFeesData);
}
if($jsonLateralFeesData['FeesAmount'] != 0 AND $jsonLateralFeesData['FeesAmount'] != '' AND $jsonLateralFeesData['FeesAmount'] != 'undefined'){
array_push($jsonSemFeesData,$jsonLateralFeesData);
}
$courseDetails = $this->course_model->addCourse($details,$jsonSemFeesData);// Check if the users data store contains users (in case the database result returns NULL)
if ($courseDetails)
{
@ -117,8 +121,14 @@ class Course_Controller extends REST_Controller {
$jsonLateralFeesData=$this->post('lateralFeesAmounts');
$jsonSemFeesData=$this->post('semFeesAmounts');
// push regular,lateral fees into same array
array_push($jsonSemFeesData,$jsonRegularFeesData);
array_push($jsonSemFeesData,$jsonLateralFeesData);
if($jsonRegularFeesData != '' AND $jsonRegularFeesData != null AND $jsonRegularFeesData != 'undefined'){
array_push($jsonSemFeesData,$jsonRegularFeesData);
}
if($jsonLateralFeesData != '' AND $jsonLateralFeesData != null AND $jsonLateralFeesData != 'undefined'){
array_push($jsonSemFeesData,$jsonLateralFeesData);
}
$updateDetails = $this->course_model->updateCourse($details,$jsonSemFeesData);// Check if the users data store contains users (in case the database result returns NULL)
if ($updateDetails)