diff --git a/Apollo/api/application/config/database.php b/Apollo/api/application/config/database.php index ed22f21b..7741a6d9 100755 --- a/Apollo/api/application/config/database.php +++ b/Apollo/api/application/config/database.php @@ -76,13 +76,13 @@ $query_builder = TRUE; $db['default'] = array( 'dsn' => '', 'hostname' => 'apollodec.com', - // 'username' => 'apollod4_DEV', - // 'password' => 'apollo1234', - // 'database' => 'apollod4_ApolloDECDev', + 'username' => 'apollod4_DEV', + 'password' => 'apollo1234', + 'database' => 'apollod4_ApolloDECDev', - 'username' => 'apollod4_SIT', - 'password' => 'apollosit1234', - 'database' => 'apollod4_ApolloDECNEWSIT', + // 'username' => 'apollod4_SIT', + // 'password' => 'apollosit1234', + // 'database' => 'apollod4_ApolloDECNEWSIT', // 'username' => 'apollod4_PROD', // 'password' => 'approd!2017', diff --git a/Apollo/api/application/controllers/HallTickets_Controller.php b/Apollo/api/application/controllers/HallTickets_Controller.php index 2b8e4480..ea1d8a9f 100644 --- a/Apollo/api/application/controllers/HallTickets_Controller.php +++ b/Apollo/api/application/controllers/HallTickets_Controller.php @@ -515,6 +515,7 @@ class HallTickets_Controller extends REST_Controller { public function getAllSemesterSubjects_post() { + //echo 'f';die(); $branchId = $this->post('BranchID'); //echo $branchId; die(); $res = $this->Hallticket_model->getAllSemesterSubjectsmodel($branchId); @@ -633,7 +634,7 @@ class HallTickets_Controller extends REST_Controller { $centerName = $this->post('centerName'); $res['UniversityDetails'] = $this->Hallticket_model->getUniversityDetials($UID,$branchId); - $res['studentDetails'] = $this->Hallticket_model->getStudentDetails($UID,$courseID,$branchId,$studentIDs,$centerName,$batch,$requestedBy); + $res['studentDetails'] = $this->Hallticket_model->getStudentDetails($UID,$branchId,$studentIDs,$centerName,$batch,$requestedBy); if(count($res['UniversityDetails']) != 0 || count($res['studentDetails']) != 0 ) diff --git a/Apollo/api/application/models/Hallticket_model.php b/Apollo/api/application/models/Hallticket_model.php index 4952738f..03a0ddf2 100644 --- a/Apollo/api/application/models/Hallticket_model.php +++ b/Apollo/api/application/models/Hallticket_model.php @@ -851,7 +851,7 @@ public function getSubjectMappingDetails($universityID,$courseIDS,$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,T_Hallticket_Master.HallTicket_ID,T_Hallticket_Student_Details.HallTicket_ID as isFlag,BalFees.balpayable'); + $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,T_Hallticket_Master.HallTicket_ID,T_Hallticket_Student_Details.HallTicket_ID as isFlag,BalFees.balpayable,T_Student_CourseDetails.CourseID as CourseID'); $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('BalFees','BalFees.student =T_Students_Fees_Status.StudentID and BalFees.course = T_Students_Fees_Status. CourseID and BalFees.branchCode = T_Students_Fees_Status.BranchCode'); @@ -861,7 +861,11 @@ public function getSubjectMappingDetails($universityID,$courseIDS,$branchId) $this->db->join('T_Hallticket_Student_Details','T_Hallticket_Master.HallTicket_ID = T_Hallticket_Student_Details.HallTicket_ID and T_Students_Fees_Status.StudentID = T_Hallticket_Student_Details.StudentID','left'); $this->db->where('T_Students_Fees_Status.BatchCode',$batch); $this->db->where('T_Students_Fees_Status.BranchCode',$branchId); + if(($courseID !='')||($courseID != null)) + { $this->db->where('T_Students_Fees_Status.CourseID',$courseID); + } + $res = $this->db->get(); $data = $res->result(); @@ -885,7 +889,11 @@ public function getSubjectMappingDetails($universityID,$courseIDS,$branchId) $studetdetails['HallTicketMasterID'] = $r->HallTicket_ID; $studetdetails['isFlag'] = $r->isFlag; $studetdetails['balpayable'] =$r->balpayable; - $studetdetails['FeeDetails'] = $this->getFeeSemesterDetails($r->StudentID,$batch,$branchId,$courseID); + $course = $r->CourseID; + $studetdetails['FeeDetails'] = $this->getFeeSemesterDetails($r->StudentID,$batch,$branchId,$course); + $studetdetails['CourseID'] = $r->CourseID; + + $studetdetails['balpayable'] =$r->balpayable; $result_array[] = $studetdetails; $prestu = $r->StudentID; } @@ -925,11 +933,13 @@ public function getSubjectMappingDetails($universityID,$courseIDS,$branchId) } //Student Details with All Corresponding Semesters and Subjects - public function getStudentDetails($UID,$courseID,$branchId,$studentIDs,$centerName,$batch,$requestedBy) + public function getStudentDetails($UID,$branchId,$studentIDs,$centerName,$batch,$requestedBy) { foreach($studentIDs as $key1 => $id) { + + $courseID= $id['CourseID']; foreach($id['FeeDetails'] as $key2 => $ind) { // Get Normel Semester @@ -1090,10 +1100,11 @@ public function getSubjectMappingDetails($universityID,$courseIDS,$branchId) } array_splice($studentIDs[$key1]['FeeDetails'],0,10,$id['FeeDetails']) ; - } + //} // echo "COE"; // print_r($studentIDs);die(); $this->saveHallTicketDataForExamAttendance($UID,$courseID,$branchId,$studentIDs,$centerName,$batch,$requestedBy); + } return $studentIDs; } @@ -1186,6 +1197,8 @@ public function getSubjectMappingDetails($universityID,$courseIDS,$branchId) } + + return true; } } } @@ -1218,6 +1231,8 @@ public function getSubjectMappingDetails($universityID,$courseIDS,$branchId) } } + + return true; } } @@ -1252,6 +1267,8 @@ public function getSubjectMappingDetails($universityID,$courseIDS,$branchId) } } } + + return true; } } } @@ -1285,6 +1302,8 @@ public function getSubjectMappingDetails($universityID,$courseIDS,$branchId) } } } + + return true; } } } diff --git a/Apollo/assets/js/controllers/generateHallTicketCtrl.js b/Apollo/assets/js/controllers/generateHallTicketCtrl.js index 8da2b931..952d4116 100755 --- a/Apollo/assets/js/controllers/generateHallTicketCtrl.js +++ b/Apollo/assets/js/controllers/generateHallTicketCtrl.js @@ -100,10 +100,10 @@ $scope.generateButtonStatus = false; return false; } - if(myModel.courseName == '' || myModel.courseName == null || myModel.courseName == undefined){ - swal('Select Course','','warning'); - return false; - } + // if(myModel.courseName == '' || myModel.courseName == null || myModel.courseName == undefined){ + // swal('Select Course','','warning'); + // return false; + // } if(myModel.batchName == null || myModel.batchName == '' || myModel.batchName == undefined){ swal('Select Batch','','warning'); diff --git a/Apollo/assets/views/hallticket/generatehallticket.html b/Apollo/assets/views/hallticket/generatehallticket.html index 2bce64bb..9c556281 100755 --- a/Apollo/assets/views/hallticket/generatehallticket.html +++ b/Apollo/assets/views/hallticket/generatehallticket.html @@ -109,6 +109,15 @@ + + +