1680 exam attendance

This commit is contained in:
rajasekar 2019-03-02 17:19:34 +05:30
parent d84c96678b
commit d49745cdfe
3 changed files with 35 additions and 27 deletions

View File

@ -631,7 +631,7 @@ public function getSubjectMappingDetails($universityID,$courseIDS,$branchId)
$this->db->WHERE('T_SemSubMap_Master.BranchCode',$branchId);
$this->db->group_by('T_SemSubMap_Master.UniversityID,T_SemSubMap_Master.CourseID');
$res = $this->db->get();
//echo $this->db->last_query();
// echo $this->db->last_query();
return $res->result();
@ -902,7 +902,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();

View File

@ -260,10 +260,14 @@ $scope.isLoaderTxt = "Loading...";
$scope.selectedBatchName = batch.options[batch.selectedIndex].text;
};
$scope.printAttendanceDetails = function() {
var AttendanceTableID_AM = "";
var AttendanceTableID_PM = "";
// $scope.currentPage = 1;
// $scope.numPerPage = 10;
$scope.pdfExamDateToDisplay = $filter('date')(new Date($rootScope.pdfexamdate),'dd-MM-yyyy');
var fileNameAM = $rootScope.pdfuname+'-'+$rootScope.pdfcenter['CenterName']+"-"+$rootScope.pdfbatch+'- Attendance of '+$scope.pdfExamDateToDisplay+'ForeNoon Session.PDF';
@ -277,14 +281,16 @@ $scope.isLoaderTxt = "Loading...";
width: 550
};
var doc1 = new jsPDF('l', 'pt');
// doc1.setPage(10);
doc1.autoTableSetDefaults({
styles: {cellPadding: 3.0, fontSize: 12},
styles: {cellPadding: 3.0, fontSize: 12, width: 7 },
headerStyles: {fillColor: [245, 245, 240], textColor: 0}
});
var doc2 = new jsPDF('l', 'pt');
// doc2.setPage(10);
doc2.autoTableSetDefaults({
styles: {cellPadding: 3.0, fontSize: 6},
styles: {cellPadding: 5.0, fontSize: 7.5, height:70 },
headerStyles: {fillColor: [245, 245, 240], textColor: 0}
});
@ -305,25 +311,25 @@ $scope.isLoaderTxt = "Loading...";
var headerAM = function(data) {
var heading = $rootScope.pdfuname+' '+$rootScope.pdfbatch+' Examination'+' '+'Center'+' '+$rootScope.pdfcenter['CenterName'];
var heading1='Attendance of '+$scope.pdfExamDateToDisplay+'Forenoon Session';
doc1.setFontSize(9);
var heading = $rootScope.pdfuname+' '+$rootScope.pdfbatch+' Examination'+' '+'Center'+' '+$rootScope.pdfcenter['CenterName']+' Attendance of '+ $scope.pdfExamDateToDisplay+' Forenoon Session ';
// var heading1='Attendance of '+$scope.pdfExamDateToDisplay+'Forenoon Session';
doc1.setFontSize(12);
doc1.setFontStyle('bold');
//doc1.text(60,30,heading);
var heading_length = heading.length;
console.log(heading_length);
var heading_start_point = 0;
var heading1_start_point = 0;
// var heading1_start_point = 0;
if(heading_length <= 100)
{
var heading_start_point = 200;
var heading1_start_point = 350;
var heading_start_point = 100;
// var heading1_start_point = 350;
console.log('heading_length <= 100');
}
else
{
var heading_start_point = 100;
var heading1_start_point = 300;
// var heading1_start_point = 300;
console.log('else');
}
// console.log(heading_length);
@ -332,40 +338,40 @@ $scope.isLoaderTxt = "Loading...";
doc1.text(heading_start_point,30,heading);
doc1.setFontSize(9);
doc1.setFontSize(12);
doc1.setFontStyle('bold');
//doc1.text(70,45,heading1);
doc1.text(heading1_start_point,45,heading1);
// doc1.text(heading1_start_point,45,heading1);
};
// ctx.textAlign = "right";
//ctx.fillText("textAlign=right",150, 140);
var headerPM = function(data) {
var heading = $rootScope.pdfuname+' '+$rootScope.pdfbatch+' Examination'+' '+'Center'+' '+$rootScope.pdfcenter['CenterName'];
var heading1='Attendance of '+$scope.pdfExamDateToDisplay+'After Noon Session';
doc2.setFontSize(9);
var heading = $rootScope.pdfuname+' '+$rootScope.pdfbatch+' Examination'+' '+'Center'+' '+$rootScope.pdfcenter['CenterName']+' Attendance of '+ $scope.pdfExamDateToDisplay+' After Noon Session';
// var heading1='Attendance of '+$scope.pdfExamDateToDisplay+'After Noon Session';
doc2.setFontSize(12);
doc2.setFontStyle('bold');
var heading_length = heading.length;
console.log(heading_length);
var heading_start_point = 0;
var heading1_start_point = 0;
// var heading1_start_point = 0;
if(heading_length <= 100)
{
var heading_start_point = 200;
var heading1_start_point = 350;
var heading_start_point = 100;
// var heading1_start_point = 350;
console.log('heading_length <= 100');
}
else
{
var heading_start_point = 100;
var heading1_start_point = 300;
// var heading1_start_point = 300;
console.log('else');
}
doc2.text(heading_start_point,30,heading);
doc2.setFontSize(9);
doc2.setFontSize(12);
doc2.setFontStyle('bold');
doc2.text(heading1_start_point,45,heading1);
// doc2.text(heading1_start_point,45,heading1);
};
@ -374,6 +380,7 @@ $scope.isLoaderTxt = "Loading...";
var options1 = {
addPageContent: headerAM,
margin: {
top: 50
@ -384,6 +391,7 @@ $scope.isLoaderTxt = "Loading...";
var options2 = {
addPageContent: headerPM,
margin: {
top: 50
@ -410,7 +418,7 @@ $scope.isLoaderTxt = "Loading...";
//console.log('END CALLED');

View File

@ -26,10 +26,10 @@
<div ng-if="ExamAttens != 'AfterNoon'">
<div id="attendance_header">
<table width="100%" border="1" id = "" style="background-color:#fff;">
<table width="102%" border="1" id = "" style="background-color:#fff;">
<tbody>
<tr>
<td><center>{{pdfuname}} {{ pdfbatch }}- Examination {{pdfcenter.CenterName}} Center Morning Attendance - {{pdfexamdate | date:"dd-MM-yyyy"}}</center></td>
<td><center> <h3 class="ng-binding" >{{pdfuname}} {{ pdfbatch }}- Examination {{pdfcenter.CenterName}} Center Morning Attendance - {{pdfexamdate | date:"dd-MM-yyyy"}} </h3></center></td>
</tr>
</tbody>
@ -77,10 +77,10 @@
<div ng-if="ExamAttens != 'Morning'">
<div id="attendance_header">
<table width="100%" border="1" id = "" style="background-color:#fff;">
<table width="102%" border="1" id = "" style="background-color:#fff;">
<tbody>
<tr>
<td><center>{{pdfuname}} {{ pdfbatch }}- Examination {{pdfcenter.CenterName}} Center AfterNoon Attendance - {{pdfexamdate | date:"dd-MM-yyyy"}}</center></td>
<td><center> <h3 class="ng-binding">{{pdfuname}} {{ pdfbatch }}- Examination {{pdfcenter.CenterName}} Center AfterNoon Attendance - {{pdfexamdate | date:"dd-MM-yyyy"}} </h3></center></td>
</tr>
</tbody>