raj
This commit is contained in:
commit
5d22a7454a
@ -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',
|
||||
|
||||
@ -258,10 +258,14 @@ class HallTickets_Controller extends REST_Controller {
|
||||
$examDate = date_create($examDate);
|
||||
$examDate = date_format(date_add($examDate,date_interval_create_from_date_string("1 days")),'Y-m-d');
|
||||
$batch = $this->post('batch');
|
||||
|
||||
$exam_attendance = $this->post('exam_attendance');
|
||||
|
||||
//echo $exam_attendance;die();
|
||||
//echo $examDate;
|
||||
$universityID = $this->post('university');
|
||||
//print_r($universityID);die();
|
||||
$result = $this->Hallticket_model->getExamAttendance_model($universityID['universityID'],$branchId,$centerName,$examDate,$batch);
|
||||
$result = $this->Hallticket_model->getExamAttendance_model($universityID['universityID'],$branchId,$centerName,$examDate,$batch,$exam_attendance);
|
||||
if($result)
|
||||
{
|
||||
$data['status'] = REST_Controller::HTTP_OK;
|
||||
|
||||
@ -1281,9 +1281,9 @@ public function getSubjectMappingDetails($universityID,$courseIDS,$branchId)
|
||||
return $data;
|
||||
|
||||
}
|
||||
public function getExamAttendance_model($UID,$branchId,$centerName,$examDate,$batch)
|
||||
public function getExamAttendance_model($UID,$branchId,$centerName,$examDate,$batch,$exam_attendance)
|
||||
{
|
||||
|
||||
|
||||
//echo $UID;die();
|
||||
$sql = "SELECT DISTINCT T_Hallticket_Master.UniversityID,T_UniversityMaster.UniversityName,T_Hallticket_Master.CourseID,T_CourseMaster.CourseName,T_CourseMaster.CourseCode,T_Hallticket_Master.BatchCode,T_BatchMaster.BatchName,T_Hallticket_Master.BranchCode,T_Hallticket_Master.CenterID,T_CenterMaster.CenterName,T_Hallticket_Student_Details.StudentID,T_StudentDetails.Firstname,T_StudentDetails.Lastname,T_Hallticket_Student_Details.EnrollmentID,T_Hallticket_Student_Details.Sem_Year,T_Hallticket_Subject_Details.SubjectCode,T_SubjectMaster.SubjectName,T_SubjectMaster.SubjectCode,T_Hallticket_Subject_Details.ExamDate,T_Hallticket_Subject_Details.FromTime,T_Hallticket_Subject_Details.EndTime FROM T_Hallticket_Master
|
||||
|
||||
@ -1305,9 +1305,25 @@ public function getSubjectMappingDetails($universityID,$courseIDS,$branchId)
|
||||
|
||||
WHERE T_Hallticket_Master.UniversityID = ? AND T_Hallticket_Master.BatchCode = ? AND T_Hallticket_Master.BranchCode = ? AND T_Hallticket_Master.CenterID = ? AND STR_TO_DATE(T_Hallticket_Subject_Details.ExamDate,'%Y-%m-%d') = STR_TO_DATE(?,'%Y-%m-%d')";
|
||||
|
||||
|
||||
if ($exam_attendance == 'Morning')
|
||||
{
|
||||
|
||||
$sql.=" and substring(T_Hallticket_Subject_Details.FromTime,6,2) ='AM'";
|
||||
|
||||
}
|
||||
|
||||
|
||||
if ($exam_attendance == 'AfterNoon')
|
||||
{
|
||||
|
||||
$sql.=" and substring(T_Hallticket_Subject_Details.FromTime,6,2) ='PM'";
|
||||
|
||||
}
|
||||
|
||||
$res = $this->db->query($sql,array($UID,$batch,$branchId,$centerName['CenterID'],$examDate));
|
||||
$result = $res->result();
|
||||
//print_r($this->db->last_query());
|
||||
//print_r($this->db->last_query());die();
|
||||
//echo "MODEL";print_r($result);die();
|
||||
return $result;
|
||||
|
||||
|
||||
@ -8,7 +8,8 @@ app.controller('examAttendanceCtrl', ["$scope","$rootScope","toaster", "$filter"
|
||||
"batchName":"",
|
||||
"centerName":"",
|
||||
"examDate":"",
|
||||
"universityName":""
|
||||
"universityName":"",
|
||||
"examAttendance":""
|
||||
};
|
||||
|
||||
$scope.pdfModel = {
|
||||
@ -93,10 +94,11 @@ $scope.isLoaderTxt = "Loading...";
|
||||
* created by kms
|
||||
* */
|
||||
$scope.studentInfo="";
|
||||
$scope.ExamAttendancee="";
|
||||
$scope.getExamAttendanceDetails = function (form,myModel) {
|
||||
|
||||
|
||||
|
||||
//console.log(myModel);return false;
|
||||
if(myModel.universityName == '' || myModel.universityName == null || myModel.universityName == undefined){
|
||||
swal('Select University','','warning');
|
||||
return false;
|
||||
@ -113,6 +115,11 @@ $scope.isLoaderTxt = "Loading...";
|
||||
if(myModel.examDate == null || myModel.examDate == '' || myModel.examDate == undefined){
|
||||
swal('Select Date of Examination','','warning');
|
||||
return false;
|
||||
}
|
||||
|
||||
if(myModel.examAttendance == null || myModel.examAttendance == '' || myModel.examAttendance == undefined){
|
||||
swal('Select Timing of Examination','','warning');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -141,6 +148,8 @@ $scope.isLoaderTxt = "Loading...";
|
||||
var examDate = myModel.examDate;
|
||||
var batch = myModel.batchName;
|
||||
var University =myModel.universityName;
|
||||
var exam_attendance = myModel.examAttendance;
|
||||
$scope.ExamAttendancee = exam_attendance;
|
||||
//alert(examDate);
|
||||
var getAttendance = {
|
||||
method: 'POST',
|
||||
@ -156,6 +165,7 @@ $scope.isLoaderTxt = "Loading...";
|
||||
requestedtBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||
branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID,
|
||||
requestedDept: JSON.parse(localStorage.getItem('localObj')).localType,
|
||||
exam_attendance:exam_attendance,
|
||||
}
|
||||
};
|
||||
$http(getAttendance).then(function (response) {
|
||||
@ -211,6 +221,8 @@ $scope.isLoaderTxt = "Loading...";
|
||||
$rootScope.pdfbatch = PDFBATCH;
|
||||
$rootScope.pdfexamdate = PDFEXAMDATE;
|
||||
$rootScope.pdfuname = UNAME;
|
||||
$rootScope.ExamAttens = $scope.ExamAttendancee;
|
||||
//console.log($rootScope.ExamAttens);return false;
|
||||
var Size = {width:800};
|
||||
var modalInstance = $modal.open({
|
||||
templateUrl: 'assets/views/hallticket/examAttendancePDF.html',
|
||||
@ -254,7 +266,7 @@ $scope.isLoaderTxt = "Loading...";
|
||||
var AttendanceTableID_PM = "";
|
||||
|
||||
$scope.pdfExamDateToDisplay = $filter('date')(new Date($rootScope.pdfexamdate),'dd-MM-yyyy');
|
||||
var fileNameAM = $rootScope.pdfuname+'-'+$rootScope.pdfcenter['CenterName']+"-"+$rootScope.pdfbatch+'- Attendance of '+$scope.pdfExamDateToDisplay+'Fore Noon Session.PDF';
|
||||
var fileNameAM = $rootScope.pdfuname+'-'+$rootScope.pdfcenter['CenterName']+"-"+$rootScope.pdfbatch+'- Attendance of '+$scope.pdfExamDateToDisplay+'ForeNoon Session.PDF';
|
||||
|
||||
var fileNamePM = $rootScope.pdfuname+'-'+$rootScope.pdfcenter['CenterName']+"-"+$rootScope.pdfbatch+'- Attendance of '+$scope.pdfExamDateToDisplay+'After Noon Session.PDF';
|
||||
|
||||
@ -266,7 +278,7 @@ $scope.isLoaderTxt = "Loading...";
|
||||
};
|
||||
var doc1 = new jsPDF('l', 'pt');
|
||||
doc1.autoTableSetDefaults({
|
||||
styles: {cellPadding: 3.0, fontSize: 6},
|
||||
styles: {cellPadding: 3.0, fontSize: 12},
|
||||
headerStyles: {fillColor: [245, 245, 240], textColor: 0}
|
||||
});
|
||||
|
||||
@ -294,7 +306,7 @@ $scope.isLoaderTxt = "Loading...";
|
||||
var headerAM = function(data) {
|
||||
|
||||
var heading = $rootScope.pdfuname+' '+$rootScope.pdfbatch+' Examination'+' '+'Center'+' '+$rootScope.pdfcenter['CenterName'];
|
||||
var heading1='Attendance of '+$scope.pdfExamDateToDisplay+'Fore Noon Session';
|
||||
var heading1='Attendance of '+$scope.pdfExamDateToDisplay+'Forenoon Session';
|
||||
doc1.setFontSize(9);
|
||||
doc1.setFontStyle('bold');
|
||||
//doc1.text(60,30,heading);
|
||||
|
||||
@ -94,7 +94,30 @@
|
||||
is-open="startOpen" ng-init="startOpen = false" name="examdate" datepicker-options="dateOptions"
|
||||
placeholder="Select Examiniation Date" close-text="Close" required="required" ng-change=""/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-md-2 form-group">
|
||||
|
||||
<label>
|
||||
Exam Attendance
|
||||
</label>
|
||||
<select ui-select2 class="form-control" name="examAttendance" tabindex="4" id="examAttendance" ng-model="myModel.examAttendance">
|
||||
<option value=""> Select Batch</option>
|
||||
<option value="All"> All </option>
|
||||
<option value="Morning"> Morning </option>
|
||||
<option value="AfterNoon"> AfterNoon </option>
|
||||
|
||||
</select>
|
||||
<!-- <pre>{{myModel.batchName | json}}</pre> -->
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-5 form-group">
|
||||
@ -115,6 +138,9 @@
|
||||
<br>
|
||||
<button type="button" ladda="ldloading1.zoom_in" tabindex="5" class="btn btn-wide btn-info" data-style="zoom-in" ng-click="getExamAttendanceDetails(Form,myModel);">GET STUDENTS</button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
@ -16,18 +16,19 @@
|
||||
<!-- <pre>{{ dataForExamAttendance | json}}</pre> -->
|
||||
|
||||
|
||||
|
||||
|
||||
<div ng-if="ExamAttens != 'AfterNoon'">
|
||||
<div id="attendance_header">
|
||||
<table width="100%" border="1" id = "" style="background-color:#fff;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><center>{{pdfuname}} {{ pdfbatch }}- Examination {{pdfcenter.CenterName}} Center Attendance - {{pdfexamdate | date:"dd-MM-yyyy"}}</center></td>
|
||||
<td><center>{{pdfuname}} {{ pdfbatch }}- Examination {{pdfcenter.CenterName}} Center Morning Attendance - {{pdfexamdate | date:"dd-MM-yyyy"}}</center></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="student_list_AM">
|
||||
<table width="100%" border="1" id = "attendanceTableAM" style="background-color:#fff;" ng-if="studentInfoAM_Length != 0">
|
||||
@ -43,6 +44,21 @@
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<div ng-if="ExamAttens != 'Morning'">
|
||||
<div id="attendance_header">
|
||||
<table width="100%" 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>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="student_list_PM">
|
||||
<table width="100%" border="1" id = "attendanceTablePM" style="background-color:#fff;" ng-if="studentInfoPM_Length != 0">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user