diff --git a/Apollo/api/application/config/database.php b/Apollo/api/application/config/database.php index f8df5be8..2e630305 100755 --- a/Apollo/api/application/config/database.php +++ b/Apollo/api/application/config/database.php @@ -76,9 +76,12 @@ $query_builder = TRUE; $db['default'] = array( 'dsn' => '', 'hostname' => 'apollodec.com', - 'username' => 'apollod4_DEV', - 'password' => 'apollo1234', - 'database' => 'apollod4_ApolloDECDev', + 'username' => 'apollod4_SIT', + 'password' => 'apollosit1234', + 'database' => 'apollod4_ApolloDECNEWSIT', + // 'username' => 'apollod4_DEV', + // 'password' => 'apollo1234', + // 'database' => 'apollod4_ApolloDECDev', 'dbdriver' => 'mysqli', 'dbprefix' => '', 'pconnect' => FALSE, diff --git a/Apollo/api/application/config/routes.php b/Apollo/api/application/config/routes.php index 05e314d7..a17e6779 100755 --- a/Apollo/api/application/config/routes.php +++ b/Apollo/api/application/config/routes.php @@ -269,6 +269,10 @@ $route['getSheduleDetails'] = 'HallTickets_Controller/getSheduleDetails'; $route['getUniversityCourseId'] = 'HallTickets_Controller/getUniversityCourseId'; $route['saveBatchSchedule'] = 'HallTickets_Controller/SaveAllBatchSchedule'; +///PROMOTE BATCH AND RE REG +$route['getUniversityBatchDetails'] = 'Reregister_Controller/getUniversityBatchDetails'; +$route['getStudentListForPromoteBatch'] = 'Reregister_Controller/getStudentListForPromoteBatch'; + //Reports $route['report_status'] = 'Report/status'; $route['report_filters'] = 'Report/filters'; diff --git a/Apollo/api/application/controllers/Reregister_Controller.php b/Apollo/api/application/controllers/Reregister_Controller.php index 89eac9e0..8c5c9091 100644 --- a/Apollo/api/application/controllers/Reregister_Controller.php +++ b/Apollo/api/application/controllers/Reregister_Controller.php @@ -28,7 +28,49 @@ class Reregister_Controller extends REST_Controller { } + // For Get University and Batch Details for PROMOTE BATCH MODULE + public function getUniversityBatchDetails_post() + { + $branchId = $this->post('branchId'); + $getUnivBatchDetails = $this->Reregister_model->getUniversityBatchDetails($branchId); + if ($getUnivBatchDetails) + { + $getUnivBatchDetails['status'] = REST_Controller::HTTP_OK; + $this->response($getUnivBatchDetails, 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 + } + } + //Get student list for promote Batch Listing Screen + public function getStudentListForPromoteBatch_post() + { + $UID = $this->post('university'); + $batch = $this->post('batch'); + $branchId = $this->post('branchId'); + + $res = $this->Reregister_model->getStudentListForPromoteBatchmodal($UID,$batch,$branchId); + if(count($res) > 0) + { + $data['status'] = REST_Controller::HTTP_OK; + $data['studentStatus'] = true; + $data['studentDetails'] = $res; + $this->response($data, REST_Controller::HTTP_OK); + } + else + { + $this->response([ + 'message' => 'Something Went Wrong!', + 'status' => REST_Controller::HTTP_NOT_FOUND + ], REST_Controller::HTTP_NOT_FOUND); + } + } diff --git a/Apollo/api/application/models/Hallticket_model.php b/Apollo/api/application/models/Hallticket_model.php index ab0f3740..fa35a558 100755 --- a/Apollo/api/application/models/Hallticket_model.php +++ b/Apollo/api/application/models/Hallticket_model.php @@ -678,6 +678,7 @@ class Hallticket_model extends CI_Model public function getStudentListForHallTicketmodel($UID,$courseID,$batch,$requestedBy,$branchId) { + $this->db->distinct(); $this->db->select('T_StudentDetails.StudentID,T_StudentDetails.MobileNumber,T_StudentDetails.Firstname,T_StudentDetails.Lastname,T_StudentDetails.EmailID,T_StudentDetails.ProfilePicPath,T_Student_CourseDetails.EnrollmentID'); $this->db->from('T_Students_Fees_Status'); $this->db->join('T_StudentDetails','T_Students_Fees_Status.StudentID=T_StudentDetails.StudentID and T_StudentDetails.IsActive = 1'); diff --git a/Apollo/api/application/models/Reregister_model.php b/Apollo/api/application/models/Reregister_model.php index cba1a571..1af927dc 100644 --- a/Apollo/api/application/models/Reregister_model.php +++ b/Apollo/api/application/models/Reregister_model.php @@ -12,5 +12,94 @@ class Reregister_model extends CI_Model { + public function getUniversityBatchDetails($branchId) + { + $this->db->select('UniversityID,UniversityName'); + $this->db->where('IsActive','1'); + $this->db->where('BranchCode',$branchId); + $this->db->order_by('UniversityID','ASC'); + $unviversityDetails = $this->db->get(UNIVERSITY); + if($unviversityDetails->result()){ + $result_university = array(); + $result_university['universityStatus'] = true; + foreach ($unviversityDetails->result() as $row) + { + + $university_array['universityID'] = $row->UniversityID; + $university_array['universityName'] = $row->UniversityName; + //$university_array['courseDetails']= $this->getCourseDetails($row->UniversityID,$branchId); + $university_array['batchDetails']= $this->getBatchDetails($row->UniversityID,$branchId); + $result_array[]=$university_array; + } + $result_university['univerSityDetails']= $result_array; + //$result_university['centerDetails'] = $this->getCenterDetails($branchId); + } + else { + $result_university['universityStatus'] = false; + $result_university['message'] = "No records found!"; + $result_university['universityID'] = ""; + $result_university['universityName'] = ""; + $result_university['courseDetails']= ""; + } + + + return $result_university; + + } + + public function getBatchDetails($UniversityID,$branchId) + { + $this->db->select("BatchID,BatchCode,BatchName,str_to_date( BatchDate,'%d-%m-%Y') as BD"); + $this->db->from('T_BatchMaster'); + $this->db->where('UniversityID',$UniversityID); + $this->db->where('IsActive',1); + $this->db->where('BranchCode',$branchId); + $this->db->order_by("BD","DESC"); + $res = $this->db->get(); + return $res->result(); + + } + + + + public function getStudentListForPromoteBatchmodal($UID,$batch,$branchId) + { + $this->db->select('T_StudentDetails.StudentID,T_StudentDetails.MobileNumber,T_StudentDetails.Firstname,T_StudentDetails.Lastname,T_StudentDetails.EmailID'); + $this->db->from('T_Students_Fees_Status'); + $this->db->join('T_StudentDetails','T_Students_Fees_Status.StudentID=T_StudentDetails.StudentID and T_StudentDetails.IsActive = 1'); + $this->db->join('T_Course_Fees_Details','T_Students_Fees_Status.CourseID = T_Course_Fees_Details.CourseID and T_Students_Fees_Status.FeesType = T_Course_Fees_Details.ID and T_Course_Fees_Details.ProgramType = "Y001" and T_Course_Fees_Details.FeesType = "F002" and T_StudentDetails.IsActive = 1' ); + $this->db->where('T_Students_Fees_Status.BatchCode',$batch); + $this->db->where('T_Students_Fees_Status.BranchCode',$branchId); + + + $res = $this->db->get(); + $data = $res->result(); + return $data; + // $result_array = array(); + // if(count($data) > 0) + // { + // $result_array = array(); + // $prestu = ""; + // foreach($data as $r) + // { + // if($prestu != $r->StudentID) + // { + // $studetdetails['StudentID'] = $r->StudentID; + // $studetdetails['MobileNumber'] = $r->MobileNumber; + // $studetdetails['Firstname'] = $r->Firstname; + // $studetdetails['Lastname'] = $r->Lastname; + // $studetdetails['EmailID'] = $r->EmailID; + // $studetdetails['ProfilePicPath'] = $r->ProfilePicPath; + // $studetdetails['EnrollmentID'] = $r->EnrollmentID; + // $studetdetails['FeeDetails'] = $this->getFeeSemesterDetails($r->StudentID,$batch,$branchId,$courseID); + // $result_array[] = $studetdetails; + // $prestu = $r->StudentID; + // } + // } + + // } + // return $result_array; + + } } \ No newline at end of file diff --git a/Apollo/assets/js/controllers/BatchmomentCtrl.js b/Apollo/assets/js/controllers/BatchmomentCtrl.js index 31e6d86a..54f27adc 100644 --- a/Apollo/assets/js/controllers/BatchmomentCtrl.js +++ b/Apollo/assets/js/controllers/BatchmomentCtrl.js @@ -1,15 +1,174 @@ 'use strict'; /** - * controllers for ng-table + * This Controller for Promote Students Funcitonality. * Simple table with sorting and filtering on AngularJS */ app.controller('BatchmomentCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTableParams", "API_POINTS", "$localStorage", "$http", "$state","$modal","$log", function ($scope,$rootScope,toaster, $filter, ngTableParams, apiPoint, $localStorage, $http, $state,$modal,$log) { - $scope.myModel = { + + $scope.myModel = { "universityName":"", - "courseName":"", - "batchName":"" + "batchName":"", + "batchID":"" }; +$scope.isTblShow = false; +$scope.isLoader = false; +$scope.isLoaderShow = false; +$scope.isLoaderTxt = "Loading..."; + + +/* + * init function + * created by velz + * */ + $scope.init = function () { + + var getUniv = { + method: 'POST', + url: apiPoint.url + 'getUniversityBatchDetails/', + headers: { + 'Content-Type': 'application/json' + }, + data: { + requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID, + branchId:JSON.parse(localStorage.getItem('localObj')).localBranchID + } + }; + $http(getUniv).then(function (response) { + if (response.data.status==200 && response.data.universityStatus) { + $scope.university = response.data.univerSityDetails; + + + } else { + swal('University Not Found','','error'); + $scope.university = ""; + + } + }); + } + + + + $scope.getStudentDetails = function () { + + if($scope.myModel.universityName == null || $scope.myModel.universityName == '' || $scope.myModel.universityName == undefined){ + swal('Select University','','warning'); + return false; + } + + if($scope.myModel.batchName == null || $scope.myModel.batchName == '' || $scope.myModel.batchName == undefined){ + swal('Select Batch','','warning'); + return false; + } + + + + $scope.selectedStudentsID = []; + $scope.isLoaderShow = true; + $scope.myModel.all = false; + $scope.isTblShow = false; + var university = $scope.myModel.universityName; + var batch = $scope.myModel.batchName; + var getStudents = { + method: 'POST', + url: apiPoint.url + 'getStudentListForPromoteBatch/', + headers: { + 'Content-Type': 'application/json' + }, + data: { + university: university, + batch:batch, + branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID, + } + }; + $http(getStudents).then(function (response) { + if (response.data.status == 200 && response.data.studentStatus) { + $scope.studentInfo = response.data.studentDetails; + $scope.isLoaderShow = false; + $scope.isTblShow = true; + + + } + else + { + $scope.studentInfo=""; + $scope.isLoaderShow = true; + $scope.isTblShow = false; + $scope.isLoaderTxt = "No Records Found"; + } + },function(error){ + $scope.isLoaderShow = true; + $scope.isTblShow = false; + $scope.isLoaderTxt = "No Records Found"; + + }); + + + } + + + + $scope.selectedStudentsID = []; + $scope.isClick = function(e) + { + + + var ide = e.target; + var val = (ide.checked ? true : false); + var sid = e.target.id; + angular.forEach($scope.studentInfo,function(value,key){ + if(sid == value.StudentID) + { + sid = value; + } + }); + + var pos = $scope.selectedStudentsID.indexOf(sid); + + if(val) + { + if( pos == -1) + { + + $scope.selectedStudentsID.push(sid); + } + + } + else + { + + $scope.selectedStudentsID.splice(pos,1); + } + + + + } + + + + $scope.isCheckAll = function(e) + { + var val = (e.target.checked ? true : false); + + if(val) + { + var len = $scope.studentInfo.length; + var i = 0; + for(i=0;iSEMESTER --> - sem/yearPaper CodeSubject NameDateTimeInvigi.sign + Sem/YearPaper CodeSubject NameDateTimeInvigi.sign @@ -75,7 +75,7 @@ - sem/yearPaper CodeSubject NameDateTimeInvigi.sign + Sem/YearPaper CodeSubject NameDateTimeInvigi.sign @@ -92,7 +92,7 @@ - sem/yearPaper CodeSubject NameDateTimeInvigi.sign + Sem/YearPaper CodeSubject NameDateTimeInvigi.sign @@ -109,7 +109,7 @@ - sem/yearPaper CodeSubject NameDateTimeInvigi.sign + Sem/YearPaper CodeSubject NameDateTimeInvigi.sign @@ -126,7 +126,7 @@ - sem/yearPaper CodeSubject NameDateTimeInvigi.sign + Sem/YearPaper CodeSubject NameDateTimeInvigi.sign @@ -146,7 +146,7 @@ - sem/yearPaper CodeSubject NameDateTimeInvigi.sign + Sem/YearPaper CodeSubject NameDateTimeInvigi.sign diff --git a/Apollo/assets/views/partials/nav.html b/Apollo/assets/views/partials/nav.html index 41a0295b..c55de2c9 100755 --- a/Apollo/assets/views/partials/nav.html +++ b/Apollo/assets/views/partials/nav.html @@ -346,7 +346,7 @@
- +
REREGISTRATION diff --git a/Apollo/assets/views/reregistration/promotebatch.html b/Apollo/assets/views/reregistration/promotebatch.html index aab2a0af..92e4f39e 100644 --- a/Apollo/assets/views/reregistration/promotebatch.html +++ b/Apollo/assets/views/reregistration/promotebatch.html @@ -64,10 +64,10 @@ - --> + -
+