Hall Ticket Issues Fixed : 1185 - Velz

This commit is contained in:
velz 2018-06-14 18:15:07 +05:30
parent 4588e22c3f
commit 573047cc34
13 changed files with 524 additions and 23 deletions

View File

@ -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,

View File

@ -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';

View File

@ -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);
}
}

View File

@ -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');

View File

@ -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;
}
}

View File

@ -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;i<len;i++)
{
if($scope.selectedStudentsID.indexOf($scope.studentInfo[i]) === -1)
{
$scope.selectedStudentsID.push($scope.studentInfo[i]);
}
}
}
else
{
$scope.selectedStudentsID = [];
}
}
}]);

View File

@ -339,8 +339,8 @@ app.controller('HallTicketPDFCtrl', ["$scope", "$modalInstance", "pdfitems", fun
if(value.StudentID)
{
if(hallticket_type == 'SEM' || hallticket_type == 'REG' || hallticket_type == 'LAT'){
if(hallticket_type == 'REG' || hallticket_type == 'LAT'){
console.log('REGLAT');
var semlength = value.FeeDetails.length;
if(hallticket_type == 'REG' || hallticket_type == 'LAT')
{
@ -391,7 +391,7 @@ app.controller('HallTicketPDFCtrl', ["$scope", "$modalInstance", "pdfitems", fun
var tableid = value.StudentID;
doc.autoTableSetDefaults({
styles: {cellPadding: 3.0, fontSize: 10},
styles: {cellPadding: 3.0, fontSize: 8},
headerStyles: {fillColor: [245, 245, 240], textColor: 0}
});
@ -488,7 +488,7 @@ app.controller('HallTicketPDFCtrl', ["$scope", "$modalInstance", "pdfitems", fun
}
else
{
autoTableEndPosYvalue = 350;
autoTableEndPosYvalue = 300;
}
var options2 = {
@ -540,7 +540,7 @@ app.controller('HallTicketPDFCtrl', ["$scope", "$modalInstance", "pdfitems", fun
else if(hallticket_type == 'YEAR')
{
console.log('YEAR');
var semlength = value.FeeDetails.length;
var i = 0;
for(i = 0; i <= semlength;i++)
@ -588,7 +588,7 @@ app.controller('HallTicketPDFCtrl', ["$scope", "$modalInstance", "pdfitems", fun
var tableid = value.StudentID;
doc.autoTableSetDefaults({
styles: {cellPadding: 3.0, fontSize: 10},
styles: {cellPadding: 3.0, fontSize: 8},
headerStyles: {fillColor: [245, 245, 240], textColor: 0},
@ -735,6 +735,209 @@ app.controller('HallTicketPDFCtrl', ["$scope", "$modalInstance", "pdfitems", fun
}//End of semlength for loop
}//END OF YEAR HALL TICKET TYPE
else if(hallticket_type == 'SEM' ){
console.log('SEM');
var semlength = value.FeeDetails.length;
var i = 0;
for(i = 0; i < semlength;i++)
{
var fileName = "DEFAULT.pdf";
var margins = {
top: 70,
bottom: 40,
left: 30,
width: 550
};
var doc = new jsPDF('p', 'pt');
//convert img to base 64
var img = document.getElementById("logo")
var canvas = document.createElement("canvas");
canvas.width = 100;
canvas.height = 100;
var ctx = canvas.getContext("2d");
ctx.drawImage(img, 0, 0,100,100);
var dataURL = canvas.toDataURL("image/png");
//console.log('***'+dataURL);
//convert img to base 64
//convert img to base 64
var profile = document.getElementById("sprofile")
var canvas2 = document.createElement("canvas");
canvas2.width = 100;
canvas2.height = 100;
var ctx2 = canvas2.getContext("2d");
ctx2.drawImage(profile, 0, 0,100,100);
var profiledataURL = canvas2.toDataURL("image/png",1.0);
//convert img to base 64
var sem1 = "";
//var sem2 = "";
var tableid = value.StudentID;
doc.autoTableSetDefaults({
styles: {cellPadding: 3.0, fontSize: 8},
headerStyles: {fillColor: [245, 245, 240], textColor: 0}
});
var firstTableID = tableid+i;
// var SecTableID = (tableid+(i+1));
if(document.getElementById(firstTableID))
{
var sem1 = doc.autoTableHtmlToJson(document.getElementById(firstTableID));
}
// if(document.getElementById(SecTableID))
// {
// var sem2 = doc.autoTableHtmlToJson(document.getElementById(SecTableID));
// }
var header = function(data) {
var examName = 'ADMIT CARD : '+$scope.courseNamePDF+' EXAMINATION ' +$scope.batchNamePDF;
var rollNo = 'Reg No : '+value.EnrollmentID;
var stuName = 'Name : '+value.Firstname+' '+value.Lastname;
var centerName = 'Centre : '+$scope.centerNamePDF;
// if(hallticket_type == 'SEM' || hallticket_type == 'REG')
// {
// var semName = 'SEM'+(i+1)+'&'+(i+2);
// }
// else if(hallticket_type == 'LAT')
// {
// var semName = 'SEM'+(i+3)+'&'+(i+4);
// }
var semName = 'SEM'+(i+1);
fileName = value.EnrollmentID+'-'+value.Firstname+value.Lastname+$scope.courseNamePDF+semName+'.pdf';
doc.setDrawColor(0);
doc.setFillColor(245, 245, 240);
doc.rect(150, 30, 395, 60,'FD');
doc.setFontSize(12);
doc.setTextColor(40);
doc.setFontStyle('normal');
doc.addImage(dataURL, 'jpeg', 75, 35, 50, 50);//university logo location
doc.addImage(profiledataURL, 'jpeg', 470, 100, 60, 60);//student profile location
doc.setFontSize(22);
doc.text(160,50,$scope.universityNamePDF);
doc.setFontSize(10);
doc.text(160,65,$scope.universityAddressPDF);
doc.setFontSize(10);
doc.text(160,88,$scope.universityEmailPDF);
doc.rect(45, 100, 400, 60);
doc.rect(445, 100, 100, 60);
doc.line(45, 125, 445, 125);
doc.setFontSize(10);
doc.setFontType("bold");
doc.text(80,115,examName);
doc.setFontType("normal");
doc.text(50,140,rollNo);
doc.text(230,140,stuName);
doc.text(50,155,centerName);
//footer content
var footerNote1 ="Note : 1. Without Identification Card Candidates shallnot Allowed to write for examination.";
var footerNote2 ="2. For further instructions refer to the facing sheet of the Answer book before writting examination.";
var footerNote3 ="3. Carrying Mobile phone to the examination hall is strictly prohibited.";
var footerNote4 ="4. Attend the examintaion as per mentioned above.";
var footerNote_student_sign ="Signature of the Student";
var footerNote_controller_sign ="Controller of Examination";
doc.setFontSize(8);
doc.text(40,doc.internal.pageSize.height - 150,footerNote1);
doc.text(70,doc.internal.pageSize.height - 140,footerNote2);
doc.text(70,doc.internal.pageSize.height - 130,footerNote3);
doc.text(70,doc.internal.pageSize.height - 120,footerNote4);
doc.text(40,doc.internal.pageSize.height - 50,footerNote_student_sign);
doc.text(450,doc.internal.pageSize.height - 50,footerNote_controller_sign);
};
// var autoTableEndPosYvalue = 0;
// if(sem1 == "")
// {
// autoTableEndPosYvalue = 200;
// }
// else
// {
// autoTableEndPosYvalue = 300;
// }
// var options2 = {
// addPageContent: header,
// margin: {
// top: 100
// },
// startY: doc.autoTableEndPosY() + autoTableEndPosYvalue,
// theme :'grid'
// };
var options1 = {
addPageContent: header,
margin: {
top: 200
},
theme :'grid'
};
if(sem1 != "")
{
doc.autoTable(sem1.columns, sem1.data, options1);
}
// if(sem2 != "")
// {
// doc.autoTable(sem2.columns, sem2.data, options2);
// }
if(sem2 != "" || sem1 != "")
{
doc.save(fileName);
}
}//End of semlength for loop
}
}// END of studentID Check

View File

@ -57,7 +57,7 @@
<!-- <th colspan="6">SEMESTER</th> -->
<!-- </tr> -->
<tr>
<th width="5%">sem/year</th><th width="10%">Paper Code</th><th>Subject Name</th><th width="5%">Date</th><th width="15%">Time</th><th width="5%">Invigi.sign</th>
<th width="5%">Sem/Year</th><th width="10%">Paper Code</th><th>Subject Name</th><th width="5%">Date</th><th width="15%">Time</th><th width="5%">Invigi.sign</th>
</tr>
</thead>
<tbody>
@ -75,7 +75,7 @@
<thead>
<tr>
<th width="5%">sem/year</th><th width="10%">Paper Code</th><th>Subject Name</th><th width="5%">Date</th><th width="15%">Time</th><th width="5%">Invigi.sign</th>
<th width="5%">Sem/Year</th><th width="10%">Paper Code</th><th>Subject Name</th><th width="5%">Date</th><th width="15%">Time</th><th width="5%">Invigi.sign</th>
</tr>
</thead>
<tbody>
@ -92,7 +92,7 @@
<thead>
<tr>
<th width="5%">sem/year</th><th width="10%">Paper Code</th><th>Subject Name</th><th width="5%">Date</th><th width="15%">Time</th><th width="5%">Invigi.sign</th>
<th width="5%">Sem/Year</th><th width="10%">Paper Code</th><th>Subject Name</th><th width="5%">Date</th><th width="15%">Time</th><th width="5%">Invigi.sign</th>
</tr>
</thead>
<tbody>
@ -109,7 +109,7 @@
<thead>
<tr>
<th width="5%">sem/year</th><th width="10%">Paper Code</th><th>Subject Name</th><th width="5%">Date</th><th width="15%">Time</th><th width="5%">Invigi.sign</th>
<th width="5%">Sem/Year</th><th width="10%">Paper Code</th><th>Subject Name</th><th width="5%">Date</th><th width="15%">Time</th><th width="5%">Invigi.sign</th>
</tr>
</thead>
<tbody>
@ -126,7 +126,7 @@
<thead>
<tr>
<th width="5%">sem/year</th><th width="10%">Paper Code</th><th>Subject Name</th><th width="5%">Date</th><th width="15%">Time</th><th width="5%">Invigi.sign</th>
<th width="5%">Sem/Year</th><th width="10%">Paper Code</th><th>Subject Name</th><th width="5%">Date</th><th width="15%">Time</th><th width="5%">Invigi.sign</th>
</tr>
</thead>
<tbody>
@ -146,7 +146,7 @@
<thead>
<tr>
<th width="5%">sem/year</th><th width="10%">Paper Code</th><th>Subject Name</th><th width="5%">Date</th><th width="15%">Time</th><th width="5%">Invigi.sign</th>
<th width="5%">Sem/Year</th><th width="10%">Paper Code</th><th>Subject Name</th><th width="5%">Date</th><th width="15%">Time</th><th width="5%">Invigi.sign</th>
</tr>
</thead>
<tbody>

View File

@ -346,7 +346,7 @@
<a href="javascript:void(0)">
<div class="item-content">
<div class="item-media">
<i class="ti-write"></i>
<i class="ti-rocket"></i>
</div>
<div class="item-inner">
<span class="title" translate="sidebar.nav.master.REREGISTRATION"> REREGISTRATION </span>

View File

@ -64,10 +64,10 @@
<!-- <option ng-repeat="courseDetails in myModel.universityName.courseDetails" value="{{courseDetails.CourseID}}"><span ng-show="courseDetails.CourseCode != ''"><strong>{{courseDetails.CourseName}}</strong></span></option> -->
<!-- </select> -->
<!-- <!-- <pre>{{myModel.courseName|json}}</pre> --> -->
<!-- <pre>{{myModel.courseName|json}}</pre> -->
<!-- </div> -->
<div class="col-md-2 form-group">
<div class="col-md-3 form-group">
<label>
Batch Name
@ -84,7 +84,7 @@
<div class="col-md-2 form-group">
<br>
<button type="button" ladda="ldloading1.zoom_in" tabindex="5" class="btn btn-wide btn-info" data-style="zoom-in" ng-click="getStudentDetails(Form,myModel);">GET STUDENTS</button>
<button type="button" ladda="ldloading1.zoom_in" tabindex="5" class="btn btn-wide btn-info" data-style="zoom-in" ng-click="getStudentDetails();">GET STUDENTS</button>
</div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB