diff --git a/Apollo/api/application/config/routes.php b/Apollo/api/application/config/routes.php
index 34c76765..ab7e5a5c 100755
--- a/Apollo/api/application/config/routes.php
+++ b/Apollo/api/application/config/routes.php
@@ -375,6 +375,7 @@ $route['updateSessionScheduleDetails'] = 'SessionSchedule_Controller/updateSessi
/// halltickets and Exam Attendance
$route['getUniversityCourseDetails'] = 'HallTickets_Controller/getUniversityCourseDetails';
+// $route['getallStudentdetails'] = 'HallTickets_Controller/getallStudentdetails';
$route['getSemesterSubjectDetails'] = 'HallTickets_Controller/getSemesterSubjectDetails';
$route['getExistingMapping'] = 'HallTickets_Controller/getExistingMapping';
$route['saveAllSemSubMapping'] = 'HallTickets_Controller/saveAllSemesterSubjectMapping';
@@ -382,6 +383,8 @@ $route['getAllSemSubjects'] = 'HallTickets_Controller/getAllSemesterSubjects';
$route['getIndividualCourseSemMappingDetails'] = 'HallTickets_Controller/getIndividualCourseSemMappingDetails';
$route['updateAllSemSubMapping'] = 'HallTickets_Controller/updateAllSemesterSubjectMapping';
$route['getStudentListForHallTicket'] = 'HallTickets_Controller/getStudentListForHallTicket';
+
+$route['getallStudentdetails'] = 'HallTickets_Controller/getallStudentdetails';
$route['getHallTicket'] = 'HallTickets_Controller/getHallTicket';
$route['getBatchAndCenterDetails'] = 'HallTickets_Controller/getBatchAndCenterDetails';
$route['getStudentDetailsForExamAttendance'] = 'HallTickets_Controller/getStudentDetailsForExamAttendance';
diff --git a/Apollo/api/application/controllers/HallTickets_Controller.php b/Apollo/api/application/controllers/HallTickets_Controller.php
index 0a895003..5efb8748 100644
--- a/Apollo/api/application/controllers/HallTickets_Controller.php
+++ b/Apollo/api/application/controllers/HallTickets_Controller.php
@@ -606,7 +606,34 @@ class HallTickets_Controller extends REST_Controller {
//print_r($center);die();
$res = $this->Hallticket_model->getStudentListForHallTicketmodel($UID,$courseID,$batch,$requestedBy,$branchId,$center);
// echo "CON";
- // print_r($res);die();
+ // print_r($res);die();
+ 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);
+ }
+ }
+ public function getallStudentdetails_post()
+ {
+ $UID = $this->post('university');
+ $courseID = $this->post('course');
+ $batch = $this->post('batch');
+ $requestedBy = $this->post('requestedDept');
+ $branchId = $this->post('branchId');
+ $center = $this->post('center');
+ //print_r($center);die();
+ $res = $this->Hallticket_model->getallStudentdetails($UID,$courseID,$batch,$requestedBy,$branchId,$center);
+ // echo "CON";
+ // print_r($res);die();
if(count($res) > 0)
{
$data['status'] = REST_Controller::HTTP_OK;
diff --git a/Apollo/api/application/models/Hallticket_model.php b/Apollo/api/application/models/Hallticket_model.php
index 1587c0e5..b4f1fa20 100644
--- a/Apollo/api/application/models/Hallticket_model.php
+++ b/Apollo/api/application/models/Hallticket_model.php
@@ -873,6 +873,90 @@ public function getSubjectMappingDetails($universityID,$courseIDS,$branchId)
}
+ public function getallStudentdetails($UID,$courseID=null,$batch,$requestedBy,$branchId,$center)
+ {
+
+ $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,BalFees.semyr,T_Student_CourseDetails.CourseID as CourseID,T_CourseMaster.CourseName,T_Student_CourseDetails.UniversityID,
+ if(substr(substr(BalFees.semyr, -4), 1, 3) = "sem", substr(BalFees.semyr, -1),
+if(substr(substr(BalFees.semyr, -5), 1, 4) = "year", substr(BalFees.semyr, -1), false)) as SemID,
+if(substr(substr(BalFees.semyr, -4), 1, 3) = "sem", "SEM",
+if(substr(substr(BalFees.semyr, -5), 1, 4) = "year","YEAR", false)) as SubType,
+BalFees.semyr');
+ $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 and BalFees.bcode=T_Students_Fees_Status.BatchCode');
+
+ $this->db->join('T_Student_CourseDetails','T_StudentDetails.StudentID = T_Student_CourseDetails.StudentID and T_Students_Fees_Status.CourseID = T_Student_CourseDetails.CourseID');
+ $this->db->join('T_Hallticket_Master','T_Students_Fees_Status.CourseID = T_Hallticket_Master.CourseID and T_Students_Fees_Status.BatchCode = T_Hallticket_Master.BatchCode and T_Students_Fees_Status.BranchCode = T_Hallticket_Master.BranchCode and T_Hallticket_Master.CenterID='.$center['CenterID'],'left');
+ $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->join('T_CourseMaster','T_CourseMaster.CourseID = T_Student_CourseDetails.CourseID');
+ $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();
+
+ // print_r($this->db->last_query()); die();
+
+ $result_array = array();
+ $Course_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['HallTicketMasterID'] = $r->HallTicket_ID;
+ $studetdetails['isFlag'] = $r->isFlag;
+ $studetdetails['balpayable'] =$r->balpayable;
+ $course = $r->CourseID;
+
+ $studetdetails['FeeDetails'] = $this->getFeeSemesterDetails($r->StudentID,$batch,$branchId,$course);
+ $studetdetails['CourseID'] = $r->CourseID;
+ $studetdetails['CourseName'] = $r->CourseName;
+ $studetdetails['balpayable'] =$r->balpayable;
+ $studetdetails['semyr'] =$r->semyr;
+ $studetdetails['SemID'] =$r->SemID;
+ $result_array[] = $studetdetails;
+ $prestu = $r->StudentID;
+ array_push($Course_array,$course);
+
+
+ // }
+ }
+
+
+ //print_r($result_array);die();
+ }
+
+ // print_r($this->db->last_query()); die();
+
+ //attendance save data start
+
+ $this->saveDataForExamAttendance($UID,$courseID=null,$batch,$requestedBy,$branchId,$center,$data,$Course_array,$result_array);
+
+ //attendance end
+
+ // print_r($result_array);die();
+ return $result_array;
+
+ }
+
public function getStudentListForHallTicketmodel($UID,$courseID=null,$batch,$requestedBy,$branchId,$center)
{
@@ -902,7 +986,7 @@ BalFees.semyr');
$res = $this->db->get();
$data = $res->result();
- // print_r($this->db->last_query()); die();
+ // print_r($this->db->last_query()); die();
$result_array = array();
$Course_array = array();
@@ -925,7 +1009,8 @@ BalFees.semyr');
$studetdetails['isFlag'] = $r->isFlag;
$studetdetails['balpayable'] =$r->balpayable;
$course = $r->CourseID;
- $studetdetails['FeeDetails'] = $this->getFeeSemesterDetails($r->StudentID,$batch,$branchId,$course);
+
+ // $studetdetails['FeeDetails'] = $this->getFeeSemesterDetails($r->StudentID,$batch,$branchId,$course);
$studetdetails['CourseID'] = $r->CourseID;
$studetdetails['CourseName'] = $r->CourseName;
$studetdetails['balpayable'] =$r->balpayable;
@@ -936,30 +1021,29 @@ BalFees.semyr');
array_push($Course_array,$course);
- //}
+ // }
}
//print_r($result_array);die();
}
- // print_r($this->db->last_query()); die();
+ // print_r($this->db->last_query()); die();
//attendance save data start
- // $this->saveDataForExamAttendance($UID,$courseID=null,$batch,$requestedBy,$branchId,$center,$data,$Course_array,$result_array);
+ // $this->saveDataForExamAttendance($UID,$courseID=null,$batch,$requestedBy,$branchId,$center,$data,$Course_array,$result_array);
//attendance end
- //print_r($result_array);die();
+ // print_r($result_array);die();
return $result_array;
}
-
-
function saveDataForExamAttendance($UID,$courseID=null,$batch,$requestedBy,$branchId,$center,$data,$Course_array,$result_array)
{
+ // echo "save attendance";
$Course_array = array_unique($Course_array);
//print_r($result_array);die();
@@ -967,7 +1051,7 @@ BalFees.semyr');
foreach ($Course_array as $keyy => $vvalue)
{
-
+ // echo "save attendance for 1";
$Ava_courseId = $vvalue;
$MASTERID = '00';
@@ -987,12 +1071,14 @@ BalFees.semyr');
if(!empty($isExist[0]['HallTicket_ID']))
{
+ // echo "save attendance array push if hallticket1";
array_push($HallticketIDarray,$isExist[0]['HallTicket_ID']);
}
else
{
+ // echo "save attendance array push else hallticket1";
$masterArray = array('UniversityID'=>$UID['universityID'],'CourseID'=>$Ava_courseId,'BatchCode'=>$batch,'BranchCode'=>$branchId,'CreatedBy'=>$requestedBy,'CenterID'=>$center['CenterID']);
$this->db->trans_start();
$this->db->insert('T_Hallticket_Master',$masterArray);
@@ -1009,11 +1095,13 @@ BalFees.semyr');
foreach ($result_array as $key => $value)
{
+ // echo "save attendance for 1.1 hallticket1";
//print_r($value);
//echo $value['CourseID'];
// echo $value['semyr'];die();
foreach ($HallticketIDarray as $keyy => $vval)
{
+ // echo "save attendance for 1.2 hallticket1";
$HallId = $vval;
$this->db->select('*');
@@ -1030,7 +1118,8 @@ BalFees.semyr');
// print_r($this->db->last_query());
if($studentcheck ->result())
- { //echo 'in';
+ {
+ // echo "select hall stud " ;
$this->db->select('*');
$this->db->from('T_Hallticket_Student_Details');
$this->db->where('Hallticket_ID',$HallId);
@@ -1042,7 +1131,7 @@ BalFees.semyr');
$checkresult = $check->result();
- if(!empty($checkresult))
+ if(count($checkresult))
{
//echo 'not empty';
}
@@ -1051,7 +1140,8 @@ BalFees.semyr');
{
//print_r($check->result());
- //echo count($check);
+ // echo "------";
+ // echo "select batch";
// if(count($check)>0)
// {
@@ -1064,11 +1154,11 @@ BalFees.semyr');
$sch_checkresult = $schcheck->result();
- if(!empty($sch_checkresult))
+ if(count($sch_checkresult))
{
-
+ // echo "insert hall student";
$tempArray = array('Hallticket_ID'=>$HallId,'StudentID'=>$value['StudentID'],'EnrollmentID'=>$value['EnrollmentID'],'Sem_Year'=>$value['semyr']);
@@ -1076,12 +1166,12 @@ BalFees.semyr');
$this->db->trans_start();
$this->db->insert('T_Hallticket_Student_Details',$tempArray);
$HallTicketStudentID = $this->db->insert_id();
- $HallTicketStudentID = $this->db->insert_id();
+ // $HallTicketStudentID = $this->db->insert_id();
$this->db->trans_complete();
$semid=substr($value['semyr'], -1);
- //echo $value['semyr'];
+ // echo $value['semyr'];
@@ -1093,14 +1183,15 @@ BalFees.semyr');
{
if($semid !='1')
- {//echo 'in';
+ {
+ // echo 'in';
$semid = $semid+1;
}
}
-//echo $semid;
+ // echo $semid;
$sql = "SELECT T_SemSubMap_Child.SubjectID,T_SubjectMaster.SubjectCode,T_SubjectMaster.SubjectName,T_SemSubMap_Master.SemesterID,T_Batch_Schedule_Child.ScheduleDate,T_Batch_Schedule_Child.FromTime,T_Batch_Schedule_Child.ToTime FROM T_SemSubMap_Child
JOIN T_SubjectMaster on T_SemSubMap_Child.SubjectID = T_SubjectMaster.SubjectID
JOIN T_SemSubMap_Master on T_SemSubMap_Child.MapID = T_SemSubMap_Master.MapID and T_SemSubMap_Master.UniversityID = ? and T_SemSubMap_Master.CourseID = ? and T_SemSubMap_Master.SemesterID = ? and T_SemSubMap_Master.BranchCode = ? and T_SemSubMap_Child.IsActive = 1
@@ -1118,6 +1209,7 @@ BalFees.semyr');
foreach ($res as $keyres => $valueres)
{
+ // echo "sub insert hall";
$tempSubjectArray = array('HallTicket_Student_ID'=>$HallTicketStudentID,'SubjectCode'=>$valueres->SubjectID,'ExamDate'=>$valueres->ScheduleDate,'FromTime'=>$valueres->FromTime,'EndTime'=>$valueres->ToTime);
diff --git a/Apollo/assets/i18n/en.json b/Apollo/assets/i18n/en.json
index 6ce98ed9..ca5aa54b 100755
--- a/Apollo/assets/i18n/en.json
+++ b/Apollo/assets/i18n/en.json
@@ -190,7 +190,8 @@
"COURSESEMESTERMAPPING": "Course Subject Mapping",
"BATCHSCHEDULE": "Schedule Batches",
"GENERATEHALLTICKET": "Generate HallTicket",
- "EXAMATTENDANCE" : "Exam Attendance"
+ "EXAMATTENDANCE" : "Exam Attendance",
+ "STUDENTDETAILS": "Student Mapping"
},
"reregistration":{
"MAIN":"RE-REGISTRATION",
diff --git a/Apollo/assets/js/config.router.js b/Apollo/assets/js/config.router.js
index 2e8a03c3..ebddd3ce 100755
--- a/Apollo/assets/js/config.router.js
+++ b/Apollo/assets/js/config.router.js
@@ -802,6 +802,14 @@ app.config(['$stateProvider', '$urlRouterProvider', '$controllerProvider', '$com
ncyBreadcrumb: {
label: 'Generate HallTicket'
}
+ }).state('app.hallTicket.studentDetails', {
+ url: '/StudentDetails',
+ templateUrl: "assets/views/hallticket/studentDetails.html",
+ title: 'StudentDetails',
+ resolve: loadSequence('ladda', 'angular-ladda', 'generateHallTicketCtrl','ngTable','ui.select','spin', 'ui.mask'),
+ ncyBreadcrumb: {
+ label: 'StudentDetails'
+ }
}).state('app.hallTicket.examAttendance', {
url: '/examAttendance',
templateUrl: "assets/views/hallticket/examAttendance.html",
diff --git a/Apollo/assets/js/controllers/generateHallTicketCtrl.js b/Apollo/assets/js/controllers/generateHallTicketCtrl.js
index e0a1e233..b3c0d4c9 100644
--- a/Apollo/assets/js/controllers/generateHallTicketCtrl.js
+++ b/Apollo/assets/js/controllers/generateHallTicketCtrl.js
@@ -216,6 +216,99 @@ $scope.generateButtonStatus = false;
}
}
+ /*
+ * get student details
+ * created by kms
+ * */
+ // $scope.getstudent="";
+ $scope.StudentDetails = function (form,myModel) {
+
+ if(myModel.universityName == null || myModel.universityName == '' || myModel.universityName == undefined){
+ swal('Select University','','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');
+ return false;
+ }
+
+ if(myModel.centerName == null || myModel.centerName == '' || myModel.centerName == undefined){
+ swal('Select Center','','warning');
+ return false;
+ }
+
+
+ var firstError = null;
+ if (form.$invalid) {
+
+ var field = null, firstError = null;
+ for (field in form) {
+ if (field[0] != '$') {
+ if (firstError === null && !form[field].$valid) {
+ firstError = form[field].$name;
+ }
+ if (form[field].$pristine) {
+ form[field].$dirty = true;
+ }
+ }
+ }
+ angular.element('.ng-invalid[name=' + firstError + ']').focus();
+ // swal("The form cannot be submitted because it contains validation errors!", "Errors are marked with a red, dashed border!", "error");
+ } else {
+ $scope.selectedStudentsID = [];
+ $scope.isLoaderShow = true;
+ $scope.myModel.all = false;
+ $scope.isTblShow = false;
+ var university = myModel.universityName;
+ var course = myModel.courseName;
+ var batch = myModel.batchName;
+ var centerDetails = myModel.centerName;
+ var getStudents = {
+ method: 'POST',
+ url: apiPoint.url + 'getallStudentdetails/',
+ headers: {
+ 'Content-Type': 'application/json'
+ },
+ data: {
+ university: university,
+ course:course,
+ batch:batch,
+ requestedtBy: JSON.parse(sessionStorage.getItem('localObj')).localUserID,
+ branchId: JSON.parse(sessionStorage.getItem('localObj')).localBranchID,
+ requestedDept: JSON.parse(sessionStorage.getItem('localObj')).localType,
+ center:centerDetails
+ }
+ };
+ $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 = [];
diff --git a/Apollo/assets/views/hallticket/studentDetails.html b/Apollo/assets/views/hallticket/studentDetails.html
new file mode 100644
index 00000000..4467d783
--- /dev/null
+++ b/Apollo/assets/views/hallticket/studentDetails.html
@@ -0,0 +1,135 @@
+
+
+
+
+ Student Mapping
+
+