diff --git a/Apollo/api/application/config/constants.php b/Apollo/api/application/config/constants.php index 9c545f67..7c64fd6e 100755 --- a/Apollo/api/application/config/constants.php +++ b/Apollo/api/application/config/constants.php @@ -129,6 +129,10 @@ defined('DAYBOOKMASTER') OR define('DAYBOOKMASTER','T_DayBookMaster'); defined('INCOMEOUTCOMEMASTER') OR define('INCOMEOUTCOMEMASTER','T_Income_Outcome_Master'); defined('FEES_INSTALLMENT') OR define('FEES_INSTALLMENT','T_Fees_Installments'); defined('CENTER') OR define('CENTER','T_CenterMaster'); +defined('SUBJECTMASTER') OR define('SUBJECTMASTER','T_SubjectMaster'); +defined('SESSIONMASTER') OR define('SESSIONMASTER','T_Session_Master'); +defined('SESSIONDETAILS') OR define('SESSIONDETAILS','T_SessionDetails'); +defined('COURSESUBJECT') OR define('COURSESUBJECT','T_CourseSubject_Details'); diff --git a/Apollo/api/application/config/routes.php b/Apollo/api/application/config/routes.php index a885665b..81b07c79 100755 --- a/Apollo/api/application/config/routes.php +++ b/Apollo/api/application/config/routes.php @@ -227,9 +227,11 @@ $route['getCenterDetails'] = 'Center_Controller/getCenterDetails'; //subject $route['getSubjectDetails'] = 'Subject_Controller/getSubjectDetails'; $route['updateSubjectDetails'] = 'Subject_Controller/updateSubjectDetails'; -$route['getUniversity'] = 'Subject_Controller/getUniversity'; -$route['getCourseBatch'] = 'Subject_Controller/getCorsBatch'; $route['addSubjectDetails'] = 'Subject_Controller/addSubjectDetails'; +// session mater +$route['addSessionMaterDetails'] = 'SessionMater_Controller/addSessionMaterDetails'; +$route['getSessionMaterDetails'] = 'SessionMater_Controller/getSessionMaterDetails'; +$route['updateSessionMaterDetails'] = 'SessionMater_Controller/updateSessionMaterDetails'; diff --git a/Apollo/api/application/controllers/Center_Controller.php b/Apollo/api/application/controllers/Center_Controller.php index b1c30181..8b000cd8 100644 --- a/Apollo/api/application/controllers/Center_Controller.php +++ b/Apollo/api/application/controllers/Center_Controller.php @@ -99,13 +99,14 @@ class Center_Controller extends REST_Controller { $details['CenterCode'] = $this->post('CenterCode'); $details['CenterName'] = $this->post('CenterName'); $details['CenterAddress'] = $this->post('Address'); - $details['Comments'] = $this->post('Comments'); + $details['Comments'] = $this->post('Comments'); + $CenterID=$this->post('CenterID'); $details['IsActive'] = $this->post('status'); $details['UpdateBy'] = $this->post('updateBy'); $details['UpdateOn'] = $now->format("Y-m-d H:i:s"); - $updateDetails = $this->center_model->updateCenter($details);// Check if the users data store contains users (in case the database result returns NULL) + $updateDetails = $this->center_model->updateCenter($details,$CenterID);// Check if the users data store contains users (in case the database result returns NULL) if ($updateDetails) { diff --git a/Apollo/api/application/controllers/SessionMater_Controller.php b/Apollo/api/application/controllers/SessionMater_Controller.php new file mode 100644 index 00000000..b8f00721 --- /dev/null +++ b/Apollo/api/application/controllers/SessionMater_Controller.php @@ -0,0 +1,118 @@ +methods['addSessionMaterDetails_post']['limit'] = 100; // 50 requests per hour per user/key + $this->methods['getSessionMaterDetails_post']['limit'] = 500; // 50 requests per hour per user/key + $this->methods['updateSessionMaterDetails_post']['limit'] = 500;// 500 requests per hour per user/key + // load the model + $this->load->model('SeesionMaster_model', 'sessionM_model'); + + } + + /* + * This method used to add session master details + * created by kms + * */ + + public function addSessionMaterDetails_post() + { + $now = new DateTime(); + $now->setTimezone(new DateTimezone('Asia/Kolkata')); + $details['SessionName'] = $this->post('sessionName'); + $details['UniversityID'] = $this->post('universityName'); + $details['CreatedBy'] = $this->post('createdBy'); + $details['IsActive'] = $this->post('status'); + $details['CreatedOn'] = $now->format('Y-m-d H:i:s'); + + $sessionDetails = $this->sessionM_model->addSession($details);// Check if the users data store contains users (in case the database result returns NULL) + if ($sessionDetails) + { + $sessionDetails['status'] = REST_Controller::HTTP_OK; + // Set the response and exit + $this->response($sessionDetails, 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 + } + + + } + /* + * get session master details + * created by kms + * */ + public function getSessionMaterDetails_post() + { + $requestedBy = $this->post('requestedBy'); + $getSession = $this->sessionM_model->getSession($requestedBy); + if ($getSession) + { + $getSession['status'] = REST_Controller::HTTP_OK; + // Set the response and exit + $this->response($getSession, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code + } + else + { + // Set the response and exit + $this->response([ + 'message' => 'No records found!', + 'status' => REST_Controller::HTTP_NOT_FOUND + ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code + } + + + } + /* + * update the session master details + * created by kms + * */ + public function updateSessionMaterDetails_post() + { + $now = new DateTime(); + $now->setTimezone(new DateTimezone('Asia/Kolkata')); + $details['SessionID'] = $this->post('sessionID'); + $details['SessionName'] = $this->post('sessionName'); + $details['IsActive'] = $this->post('status'); + $universityDetails['University'] = $this->post('university'); + $details['UpdatedBy'] = $this->post('updatedBy'); + $details['UpdatedOn'] = $now->format("Y-m-d H:i:s"); + $updateDetails = $this->sessionM_model->updateSession($details,$universityDetails);// Check if the users data store contains users (in case the database result returns NULL) + + if ($updateDetails) + { + $updateDetails['status'] = REST_Controller::HTTP_OK; + // Set the response and exit + $this->response($updateDetails, 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/controllers/Subject_Controller.php b/Apollo/api/application/controllers/Subject_Controller.php index 7c48ea35..0ed22917 100644 --- a/Apollo/api/application/controllers/Subject_Controller.php +++ b/Apollo/api/application/controllers/Subject_Controller.php @@ -32,24 +32,15 @@ class Subject_Controller extends REST_Controller { public function addSubjectDetails_post() { - $now = new DateTime(); - $save['UniversityName'] = $this->post('university'); - $save['Course'] = $this->post('course'); - - $save['Batch'] = $this->post('batch'); - $save['Comments'] = $this->post('Comment'); - $save['IsActive'] = 1; + $now = new DateTime(); + $now->setTimezone(new DateTimezone('Asia/Kolkata')); + $details['SubjectCode'] = $this->post('SubjectCode'); + $details['SubjectName'] = $this->post('SubjectName'); + $details['IsActive'] = $this->post('Status'); + $details['CreatedBy'] = $this->post('createdBy'); + $details['CreatedOn'] = $now->format('Y-m-d H:i:s'); - $now->setTimezone(new DateTimezone('Asia/Kolkata')); - - $save['CreatedBy'] = $this->post('createdBy'); - $save['CreatedOn'] = $now->format('Y-m-d H:i:s'); - //$details['IsActive'] = $this->post('status'); - - - $jsonSemFeesData=$this->post('semFeesAmounts'); - - $subjectDetails = $this->subject_model->addSubject($save,$jsonSemFeesData);// Check if the users data store contains users (in case the database result returns NULL) + $subjectDetails = $this->subject_model->addSubject($details);// Check if the users data store contains users (in case the database result returns NULL) if ($subjectDetails) { @@ -98,24 +89,25 @@ class Subject_Controller extends REST_Controller { } /* - * update the Subject details + * update Subject details * * */ public function updateSubjectDetails_post() { $now = new DateTime(); $now->setTimezone(new DateTimezone('Asia/Kolkata')); - $updateID = $this->post('updateID'); - $save['Comments'] = $this->post('Comments'); - $save['IsActive'] = 1; - $save['UpdatedBy'] = $this->post('updatedBy'); - $save['UpdatedOn'] = $now->format('Y-m-d H:i:s'); - //$details['IsActive'] = $this->post('status'); - $jsonSemFeesData=$this->post('semFeesAmounts'); + $details['SubjectCode'] = $this->post('SubjectCode'); + $details['SubjectName'] = $this->post('SubjectName'); + $SubjectID = $this->post('SubjectID'); + $details['IsActive'] = $this->post('Status'); + $details['UpdatedBy'] = $this->post('updatedBy'); + $details['UpdatedOn'] = $now->format('Y-m-d H:i:s'); + + // print_r($SubjectID);die(); - $updateDetails = $this->subject_model->updateSubject($save,$jsonSemFeesData,$updateID);// Check if the users data store contains users (in case the database result returns NULL) - + $updateDetails = $this->subject_model->updateSubject($details,$SubjectID);// Check if the users data store contains users (in case the database result returns NULL) + // print_r($details,$SubjectID);die(); if ($updateDetails) { @@ -134,48 +126,8 @@ class Subject_Controller extends REST_Controller { } - //get university dropdown - public function getUniversity_post() { - $reqData = $this->post('data'); - $getUniversityListDetails = $this->subject_model->get_university_list(); - if ($getUniversityListDetails) - { - $getUniversityListDetails['status'] = REST_Controller::HTTP_OK; - // Set the response and exit - $this->response($getUniversityListDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code - } - else - { - // Set the response and exit - $this->response([ - 'message' => 'No list were found', - 'status' => REST_Controller::HTTP_NOT_FOUND - ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code - } - } - - - //get course & Batch dropdown - public function getCorsBatch_post() { - $data = $this->post('data'); - $getCourseBatchListDetails = $this->subject_model->get_courseBatch_list($data);// Check if the employee exist - if ($getCourseBatchListDetails) - { - $getCourseBatchListDetails['status'] = REST_Controller::HTTP_OK; - // Set the response and exit - $this->response($getCourseBatchListDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code - } - else - { - // Set the response and exit - $this->response([ - 'message' => 'No list were found', - 'status' => REST_Controller::HTTP_NOT_FOUND - ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code - } - } - + diff --git a/Apollo/api/application/models/Center_model.php b/Apollo/api/application/models/Center_model.php index 884218cf..02d085de 100644 --- a/Apollo/api/application/models/Center_model.php +++ b/Apollo/api/application/models/Center_model.php @@ -11,7 +11,7 @@ class Center_model extends CI_Model { /* - * Add batch details + * Add center details * created by subaramkumar */ @@ -40,7 +40,7 @@ class Center_model extends CI_Model { /* - * Get batch details + * Get center details * created by srk */ @@ -69,13 +69,23 @@ class Center_model extends CI_Model { } /* - * update batch details + * update Center details * created by Srk */ - public function updateCenter($arrayDetails=null) + public function updateCenter($arrayDetails=null,$CenterID=null) { + + $this->db->select('CenterCode'); $this->db->where('CenterCode',$arrayDetails['CenterCode']); - $updateStatus=$this->db->update(CENTER, $arrayDetails); + //$this->db->where('SubjectCode !=', $arrayDetails['SubjectCode']); + $this->db->where('CenterCode !=',$arrayDetails['CenterCode']); + if($this->db->get(CENTER)->first_row()){ + $result['centerStatus']=false; + $result['message']= " This Center code already exist"; + } + else{ + $this->db->where('CenterID',$CenterID); + $updateStatus=$this->db->update(CENTER, $arrayDetails); if($updateStatus){ $result['centerStatus'] = true; @@ -87,11 +97,14 @@ class Center_model extends CI_Model { $result['message'] = "Something went wrong.please try again"; } + } return $result; } + + } \ No newline at end of file diff --git a/Apollo/api/application/models/Course_model.php b/Apollo/api/application/models/Course_model.php index 46a4cdc6..89bd4b12 100755 --- a/Apollo/api/application/models/Course_model.php +++ b/Apollo/api/application/models/Course_model.php @@ -114,6 +114,7 @@ class Course_model extends CI_Model { public function getCourseUnivFeesTypes() { $result['universityDetails'] = $this->getUniversityDetails(); $result['feesDetails'] = $this->getFeesDetails(); + $result['subjectetails'] = $this->getSubjectDetails(); $result['courseStatus'] = true; return $result; } @@ -255,6 +256,18 @@ class Course_model extends CI_Model { return $feesDetails->result(); } + /* + * get subject details + * created by kms + * */ + public function getSubjectDetails(){ + $this->db->select('UniversityID,UniversityName'); + $this->db->order_by('UniversityID','ASC'); + $this->db->where('IsActive','1'); + $universityDetails = $this->db->get(SUBJE); + return $universityDetails->result(); + } + diff --git a/Apollo/api/application/models/SeesionMaster_model.php b/Apollo/api/application/models/SeesionMaster_model.php new file mode 100644 index 00000000..384eca95 --- /dev/null +++ b/Apollo/api/application/models/SeesionMaster_model.php @@ -0,0 +1,188 @@ +db->select('SessionName'); + $this->db->where('SessionName', $arrayDetails['SessionName']); + if($this->db->get(SESSIONMASTER)->first_row()){ + $result['sessionStatus'] = false; + $result['message'] ="This sessions is already exist."; + } + else{ + $insertMaster['SessionName']=$arrayDetails['SessionName']; + $insertMaster['CreatedBy']=$arrayDetails['CreatedBy']; + $insertMaster['IsActive']=$arrayDetails['IsActive']; + $insertMaster['CreatedOn']=$arrayDetails['CreatedOn']; + + $this->db->insert(SESSIONMASTER, $insertMaster); + + if ($this->db->affected_rows() == '1') { + $insertDetails['SessionID']=$this->db->insert_id(); + foreach ($arrayDetails['UniversityID'] as $row1){ + $insertDetails['UniversityID']=$row1['UniversityID']; + $insertDetails['CreatedBy']=$arrayDetails['CreatedBy']; + $insertDetails['IsActive']=$arrayDetails['IsActive']; + $insertDetails['CreatedOn']=$arrayDetails['CreatedOn']; + $this->db->insert(SESSIONDETAILS, $insertDetails); + + } + + $result['sessionStatus'] = true; + $result['message'] = "Sessions added successfully"; + } else { + $result['sessionStatus'] = false; + $result['message'] = "Something went wrong.please try again"; + } + + } + + + + + return $result; + + } + + + /* + * Get session master details + * created by kms + * */ + + public function getSession() + { + $this->db->select('SM.SessionID,SM.SessionName,GROUP_CONCAT(SD.UniversityID) as UniversityID,GROUP_CONCAT(SM.SessionID) as GrpID,SM.IsActive,GROUP_CONCAT(US.UniversityName) as UniversityName'); + $this->db->from(SESSIONMASTER.' as SM'); + $this->db->join(SESSIONDETAILS.' as SD', 'SM.SessionID = SD.SessionID'); + $this->db->join(UNIVERSITY.' as US', 'US.UniversityID = SD.UniversityID'); + $this->db->where('SD.IsActive','1'); + $this->db->order_by('SM.CreatedOn','DESC'); + $this->db->group_by('SM.SessionName','DESC'); + $sessionDetails = $this->db->get(); + if($sessionDetails->result()){ + + $result['sessionStatus'] = true; + $result['details'] = $sessionDetails->result(); + } + else { + $result['sessionStatus'] = false; + $result['message'] = "No records found!"; + } + // load batch model for get university details + $this->load->model('Batch_model', 'batch'); + $result['universityDetails'] = $this->batch->getUniversityDetails(); + + + return $result; + + } + + /* + * update session master details + * created by kms + * */ + public function updateSession($arrayDetails=null,$universityDetails=null) + { + $this->db->select('SessionName'); + $this->db->where('SessionName', $arrayDetails['SessionName']); + $this->db->where('SessionID !=', $arrayDetails['SessionID']); + if($this->db->get(SESSIONMASTER)->first_row()){ + $result['sessionStatus'] = false; + $result['message'] ="This sessions is already exist."; + } + else{ + $this->db->where('SessionID', $arrayDetails['SessionID']); + $upateStatus=$this->db->update(SESSIONMASTER, $arrayDetails); + + if($upateStatus){ + $deactiveStatus['IsActive']=false; + $deactiveStatus['UpdatedBy']=$arrayDetails['UpdatedBy']; + $deactiveStatus['UpdatedOn']=$arrayDetails['UpdatedOn']; + $this->db->where('SessionID ',$arrayDetails['SessionID']); + $updateActivityStatusDeactive = $this->db->update(SESSIONDETAILS, $deactiveStatus); + + if($updateActivityStatusDeactive){ + + if($universityDetails['University']){ + + foreach ($universityDetails['University'] as $urow){ + $this->db->select('ID'); + $this->db->where('SessionID',$arrayDetails['SessionID']); + $this->db->where('UniversityID',$urow); + if($this->db->get(SESSIONDETAILS)->first_row()){ + $existStatusUpdate['IsActive']=true; + $existStatusUpdate['UpdatedBy']=$arrayDetails['UpdatedBy']; + $existStatusUpdate['UpdatedOn']=$arrayDetails['UpdatedOn']; + $this->db->where('SessionID',$arrayDetails['SessionID']); + $this->db->where('UniversityID',$urow); + $this->db->update(SESSIONDETAILS, $existStatusUpdate); + } + else{ + $update_array["UniversityID"]=$urow; + $update_array["SessionID"]=$arrayDetails['SessionID']; + $update_array["IsActive"]=true; + $update_array["CreatedBy"]=$arrayDetails['UpdatedBy']; + $update_array["CreatedOn"]=$arrayDetails['UpdatedOn']; + $this->db->insert(SESSIONDETAILS, $update_array); + + } + + } + } + else{ + $activateStatus['IsActive']=true; + $this->db->where('SessionID ',$arrayDetails['SessionID']); + $this->db->update(SESSIONMASTER, $activateStatus); + + } + + + + $result['sessionStatus'] = true; + $result['message'] = "Sessions updated successfully"; + } + + + } else { + $result['sessionStatus'] = false; + $result['message'] = "Something went wrong.please try again"; + } + + } + + return $result; + + } + /* + * Get university details + * created by kms + * */ + public function getUniversityDetails()//doubt + { + $this->db->select('UniversityID,UniversityName'); + $this->db->order_by('UniversityID','ASC'); + $this->db->where('IsActive','1'); + // $this->db->where_not_in('ID', $id); + $universityDetails = $this->db->get(UNIVERSITY); + return $universityDetails->result(); + } + + + +} \ No newline at end of file diff --git a/Apollo/api/application/models/Subject_model.php b/Apollo/api/application/models/Subject_model.php index 27d73a01..37f3d269 100644 --- a/Apollo/api/application/models/Subject_model.php +++ b/Apollo/api/application/models/Subject_model.php @@ -1,6 +1,6 @@ db->insert('T_SubjectMaster', $save); - $subject_id = $this->db->insert_id(); - if($this->db->affected_rows() == '1'){ - - if($jsonSemFeesData){ - foreach($jsonSemFeesData as $row) - { + + $this->db->select('SubjectCode'); + $this->db->where('SubjectCode',$arrayDetails['SubjectCode']); + if($this->db->get('T_SubjectMaster')->first_row()){ + $result['SubjectStatus']=false; + $result['message']="This subject code already exists"; + }else{ - - $insertFeesArray['Subject_ID'] =$subject_id; - $insertFeesArray['Semester'] =$row['Semester']; - $insertFeesArray['SubjectCode'] =$row['SubjectCode']; - $insertFeesArray['SubjectName'] =$row['SubjectName']; - $insertFeesArray['CreatedOn'] =$save['CreatedOn']; - $insertFeesArray['CreatedBy'] =$save['CreatedBy']; + $this->db->insert('T_SubjectMaster',$arrayDetails); + if ($this->db->affected_rows() == '1') { + $result['SubjectStatus']=true; + $result['message']="Successfully Subject Code is added"; - $this->db->insert('T_SubjectDetails', $insertFeesArray); - - } - - $result['SubjectStatus'] = true; - $result['message'] = "Successfully Subject details added"; - - - - } else { - $result['SubjectStatus'] = false; - $result['message'] = "Something went wrong.please try again"; - } - - return $result; - -} - -} -//update subject - -public function updateSubject($save=null,$jsonSemFeesData=null,$updateID=null) -{ - $this->db->where('ID',$updateID); - $upateStatus=$this->db->update('T_SubjectMaster', $save); - - - if($upateStatus) { - - if ($jsonSemFeesData) { - foreach ($jsonSemFeesData as $row) - { - $subID = $row['ID']; - - $updateFeesArray['Subject_ID'] =$updateID; - $updateFeesArray['Semester'] =$row['Semester']; - $updateFeesArray['SubjectCode'] =$row['SubjectCode']; - $updateFeesArray['SubjectName'] =$row['SubjectName']; - $updateFeesArray['UpdatedOn'] = $save['UpdatedOn']; - $updateFeesArray['UpdatedBy'] = $save['UpdatedBy']; - - if($subID!='' OR $subID!=null){ - $this->db->where('ID', $subID); - $this->db->update('T_SubjectDetails', $updateFeesArray); - } - else{ - $this->db->insert('T_SubjectDetails', $updateFeesArray); - } - - } - $result['SubjectStatus'] = true; - $result['message'] = "Successfully subject details updated"; - } - - } - - else { - $result['SubjectStatus'] = false; - $result['message'] = "Something went wrong.please try again"; - - } - - - return $result; - + }else{ + $result['SubjectStatus'] = false; + $result['message'] = "Something went wrong.please try again"; } + } + return $result; +} + + + /* + * Update Subject details + * created by srk + */ + +public function updateSubject($arrayDetails=null,$SubjectID=null) +{ + $this->db->select('SubjectCode'); + $this->db->where('SubjectCode',$arrayDetails['SubjectCode']); + $this->db->where('SubjectCode !=', $arrayDetails['SubjectCode']); + if($this->db->get('T_SubjectMaster')->first_row()){ + $result['SubjectStatus']=false; + $result['message']="This subject code is already exists"; + }else{ + $this->db->where('SubjectID',$SubjectID); + $upateStatus=$this->db->update('T_SubjectMaster', $arrayDetails); + + + + if($upateStatus){ + + $result['SubjectStatus'] = true; + $result['message'] = "Successfully Subject details updated"; + } + + else { + + $result['SubjectStatus'] = false; + $result['message'] = "Something went wrong.please try again"; + + } + } + + return $result; + + } + /* + * Get subject details + * created by srk + */ + + + + public function getSubject() + { + $this->db->select('*'); + $this->db->order_by('CreatedOn','DESC'); + $subjectDetails = $this->db->get('T_SubjectMaster'); + + + if($subjectDetails->result()){ + + $result['SubjectStatus'] = true; + $result['details'] = $subjectDetails->result(); + } + else { + $result['SubjectStatus'] = false; + $result['message'] = "No records found!"; + } + + return $result; + + } + - //get subject details - public function getSubject() - { - $this->db->select('BS.BatchName,CU.ID,CS.CourseName,CU.Comments ,CU.IsActive,US.UniversityName'); - $this->db->from('T_SubjectMaster'.' as CU'); - $this->db->join(UNIVERSITY.' as US', 'US.UniversityID = CU.UniversityName'); - $this->db->join(COURSE.' as CS', 'CS.CourseID = CU.Course'); - $this->db->join(BATCH.' as BS', 'BS.BatchCode = CU.Batch'); - - - $this->db->order_by('CU.CreatedOn','DESC'); - $subjectDetails = $this->db->get(); - - if($subjectDetails->result()){ - - $result['SubjectStatus'] = true; - - foreach ($subjectDetails->result() as $row){ - $fetchData['ID']=$row->ID; - $fetchData['CourseName']=$row->CourseName; - $fetchData['BatchName']=$row->BatchName; - - $fetchData['Comments']=$row->Comments; - - $fetchData['IsActive']=$row->IsActive; - - $fetchData['UniversityName']=$row->UniversityName; - $fetchData['feesStructures'] = $this->getSubjectDetails($row->ID); - - $storeSubjectArray[]=$fetchData; - } - $result['details'] = $storeSubjectArray; - } - else { - $result['SubjectStatus'] = false; - $result['message'] = "No records found!"; - } - - - return $result; - } + - - // public function getUniversityDetails() - // { - // $this->db->select('UniversityID,UniversityName'); - // $this->db->order_by('UniversityID','ASC'); - // $this->db->where('IsActive','1'); - // $universityDetails = $this->db->get(UNIVERSITY); - // return $universityDetails->result(); - // } - - - - public function getSubjectDetails($ID=null) - { - - $this->db->select('ID,Subject_ID,Semester,SubjectCode,SubjectName'); - $this->db->order_by('ID','ASC'); - $this->db->where('Subject_ID',$ID); - $this->db->from('T_SubjectDetails'); - $subjectDetails = $this->db->get(); - return $subjectDetails->result(); - } - + - /*** get university list******/ - public function get_university_list() { - $this->db->select('*'); - $this->db->order_by('CreatedOn', 'DESC'); - $this->db->from(UNIVERSITY); - $this->db->where('IsActive',1); - $univDetails = $this->db->get(); - $universityDetails = $univDetails->result(); - if (count($universityDetails) > 0) { - $results['univList'] = true; - $results['university_details'] = $universityDetails; - } else { - $results['univList'] = false; - $results['message'] = 'No record found'; - } - return $results; - } - - + - /**********get course&Batch for university********/ - - public function get_courseBatch_list($univId) { - $this->db->select('C.CourseID, C.CourseName'); - $this->db->from(COURSE.' as C'); - $this->db->where('UniversityID',$univId); - $this->db->where('IsActive',1); - $courseDetails = $this->db->get(); - if($courseDetails->result()){ - $this->db->select('B.BatchCode, B.BatchName'); - $this->db->from(BATCH.' as B'); - $this->db->where('UniversityID',$univId); - $this->db->where('IsActive',1); - $batchDetails = $this->db->get(); - if( $batchDetails->result()) { - $result['courseStatus'] = true; - $result['course_details'] = $courseDetails->result(); - $result['batch_details'] = $batchDetails->result(); - } else { - $result['courseStatus'] = false; - $result['message'] = "No records found!"; - } - } - else { - $result['courseStatus'] = false; - $result['message'] = "No records found!"; - } - - return $result; - } + } \ No newline at end of file diff --git a/Apollo/assets/i18n/en.json b/Apollo/assets/i18n/en.json index 8dcb611b..bb9a7af0 100755 --- a/Apollo/assets/i18n/en.json +++ b/Apollo/assets/i18n/en.json @@ -71,7 +71,8 @@ "CERTIFICATETYPE": "CERTIFICATE TYPE", "DAYBOOKMASTER":"INCOME/EXPENSE HEADS", "CENTERMASTER": "CENTER DETAILS", - "SUBJECTMASTER":"SUBJECT MASTER" + "SUBJECTMASTER":"SUBJECT MASTER", + "SESSIONMASTER":"SESSION DETAILS" }, "student": { "MAIN": "STUDENTS", diff --git a/Apollo/assets/js/config.constant.js b/Apollo/assets/js/config.constant.js index 9aca019e..6c991692 100755 --- a/Apollo/assets/js/config.constant.js +++ b/Apollo/assets/js/config.constant.js @@ -165,6 +165,7 @@ app.constant('JS_REQUIRES', { 'centerCtrl':'assets/js/controllers/centerCtrl.js', //SUBJECT MASTER 'subjectCtrl':'assets/js/controllers/subjectCtrl.js', + 'sessionMasterCtrl':'assets/js/controllers/sessionMasterCtrl.js', //*** Filters diff --git a/Apollo/assets/js/config.router.js b/Apollo/assets/js/config.router.js index d2b101bc..9662985f 100755 --- a/Apollo/assets/js/config.router.js +++ b/Apollo/assets/js/config.router.js @@ -220,10 +220,15 @@ app.config(['$stateProvider', '$urlRouterProvider', '$controllerProvider', '$com ncyBreadcrumb: { label: 'Subject Master' }, - }) - - - .state('app.student', { + }).state('app.master.sessionMaster', { + url: '/session master', + templateUrl: "assets/views/sessionMaster.html", + resolve: loadSequence('ui.select','sessionMasterCtrl','ngTable', 'ladda', 'angular-ladda','spin'), + title: 'Session Master', + ncyBreadcrumb: { + label: 'Session Master' + }, + }).state('app.student', { url: '/student', template: '
oops! No
records found...