EXAM ATTENDANCE
This commit is contained in:
parent
4a1cf4667f
commit
23a7124e0f
@ -401,7 +401,7 @@ class HallTickets_Controller extends REST_Controller {
|
|||||||
$centerName = $this->post('centerName');
|
$centerName = $this->post('centerName');
|
||||||
|
|
||||||
$res['UniversityDetails'] = $this->Hallticket_model->getUniversityDetials($UID,$branchId);
|
$res['UniversityDetails'] = $this->Hallticket_model->getUniversityDetials($UID,$branchId);
|
||||||
$res['studentDetails'] = $this->Hallticket_model->getStudentDetails($UID,$courseID,$branchId,$studentIDs);
|
$res['studentDetails'] = $this->Hallticket_model->getStudentDetails($UID,$courseID,$branchId,$studentIDs,$centerName,$batch,$requestedBy);
|
||||||
|
|
||||||
|
|
||||||
if(count($res['UniversityDetails']) != 0 || count($res['studentDetails']) != 0 )
|
if(count($res['UniversityDetails']) != 0 || count($res['studentDetails']) != 0 )
|
||||||
|
|||||||
@ -757,7 +757,7 @@ class Hallticket_model extends CI_Model
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Student Details with All Corresponding Semesters and Subjects
|
//Student Details with All Corresponding Semesters and Subjects
|
||||||
public function getStudentDetails($UID,$courseID,$branchId,$studentIDs)
|
public function getStudentDetails($UID,$courseID,$branchId,$studentIDs,$centerName,$batch,$requestedBy)
|
||||||
{
|
{
|
||||||
|
|
||||||
foreach($studentIDs as $key1 => $id)
|
foreach($studentIDs as $key1 => $id)
|
||||||
@ -918,12 +918,102 @@ class Hallticket_model extends CI_Model
|
|||||||
array_splice($studentIDs[$key1]['FeeDetails'],0,10,$id['FeeDetails']) ;
|
array_splice($studentIDs[$key1]['FeeDetails'],0,10,$id['FeeDetails']) ;
|
||||||
|
|
||||||
}
|
}
|
||||||
//print_r($studentIDs);//die();
|
//print_r($studentIDs);die();
|
||||||
|
$this->saveHallTicketDataForExamAttendance($UID,$courseID,$branchId,$studentIDs,$centerName,$batch,$requestedBy);
|
||||||
return $studentIDs;
|
return $studentIDs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function saveHallTicketDataForExamAttendance($UID,$courseID,$branchId,$studentIDs,$centerName,$batch,$requestedBy)
|
||||||
|
{
|
||||||
|
$MASTERID = '00';
|
||||||
|
|
||||||
|
$this->db->select('HallTicket_ID');
|
||||||
|
$this->db->from('T_Hallticket_Master');
|
||||||
|
$this->db->where('UniversityID',$UID['universityID']);
|
||||||
|
$this->db->where('CourseID',$courseID);
|
||||||
|
$this->db->where('BatchCode',$batch);
|
||||||
|
$this->db->where('CenterID',$centerName['CenterID']);
|
||||||
|
$this->db->where('BranchCode',$branchId);
|
||||||
|
$isExist = $this->db->get();
|
||||||
|
$isExist = $isExist->result_array();
|
||||||
|
|
||||||
|
//print_r($isExist);die();
|
||||||
|
if(!empty($isExist[0]['HallTicket_ID']))
|
||||||
|
{
|
||||||
|
$MASTERID = $isExist[0]['HallTicket_ID'];
|
||||||
|
|
||||||
|
$this->db->trans_start();
|
||||||
|
$this->db->where('HallTicket_ID',$MASTERID);
|
||||||
|
$this->db->update('T_Hallticket_Master',array('UpdatedBy'=>$requestedBy));
|
||||||
|
$this->db->trans_complete();
|
||||||
|
|
||||||
|
$this->db->trans_start();
|
||||||
|
$this->db->select('HallTicket_Student_ID');
|
||||||
|
$this->db->from('T_Hallticket_Student_Details');
|
||||||
|
$this->db->where('`HallTicket_ID',$MASTERID);
|
||||||
|
$existStudentID = $this->db->get();
|
||||||
|
$existStudentID = $existStudentID->result_array();
|
||||||
|
$this->db->trans_complete();
|
||||||
|
$finalExistStudentID = array();
|
||||||
|
foreach($existStudentID as $exist)
|
||||||
|
{
|
||||||
|
$finalExistStudentID[] = $exist['HallTicket_Student_ID'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->db->trans_start();
|
||||||
|
$this->db->where_in('HallTicket_ID',$MASTERID);
|
||||||
|
$this->db->delete('T_Hallticket_Student_Details');
|
||||||
|
$this->db->trans_complete();
|
||||||
|
|
||||||
|
$this->db->trans_start();
|
||||||
|
$this->db->where_in('HallTicket_Student_ID',$finalExistStudentID);
|
||||||
|
$this->db->delete('T_Hallticket_Subject_Details');
|
||||||
|
$this->db->trans_complete();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$masterArray = array('UniversityID'=>$UID['universityID'],'CourseID'=>$courseID,'BatchCode'=>$batch,'BranchCode'=>$branchId,'CreatedBy'=>$requestedBy,'CenterID'=>$centerName['CenterID']);
|
||||||
|
$this->db->trans_start();
|
||||||
|
$this->db->insert('T_Hallticket_Master',$masterArray);
|
||||||
|
$MASTERID = $this->db->insert_id();
|
||||||
|
$this->db->trans_complete();
|
||||||
|
}
|
||||||
|
//Save University,Course,Batch,BranchCode, and Center ID
|
||||||
|
|
||||||
|
foreach($studentIDs as $student)
|
||||||
|
{
|
||||||
|
//print_r($student);echo "</br>";
|
||||||
|
if(!empty($student['FeeDetails']))
|
||||||
|
{
|
||||||
|
foreach($student['FeeDetails'] as $key => $fees)
|
||||||
|
{
|
||||||
|
//print_r($fees);
|
||||||
|
$tempArray = array('Hallticket_ID'=>$MASTERID,'StudentID'=>$student['StudentID'],'EnrollmentID'=>$student['EnrollmentID'],'Sem_Year'=>('SEM'.($key + 1)));
|
||||||
|
|
||||||
|
$this->db->trans_start();
|
||||||
|
$this->db->insert('T_Hallticket_Student_Details',$tempArray);
|
||||||
|
$HallTicketStudentID = $this->db->insert_id();
|
||||||
|
$this->db->trans_complete();
|
||||||
|
|
||||||
|
foreach($fees as $subject)
|
||||||
|
{
|
||||||
|
//echo $subject->SubjectCode;echo "</br>";
|
||||||
|
$tempSubjectArray = array('HallTicket_Student_ID'=>$HallTicketStudentID,'SubjectCode'=>$subject->SubjectCode,'ExamDate'=>$subject->ScheduleDate,'FromTime'=>$subject->FromTime,'EndTime'=>$subject->ToTime);
|
||||||
|
|
||||||
|
$this->db->trans_start();
|
||||||
|
$this->db->insert('T_Hallticket_Subject_Details',$tempSubjectArray);
|
||||||
|
$this->db->trans_complete();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public function AddBatchScheduleMaster($schedulemaster,$detailArray)
|
public function AddBatchScheduleMaster($schedulemaster,$detailArray)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -26,6 +26,8 @@ $scope.isTblShow = false;
|
|||||||
$scope.isLoader = false;
|
$scope.isLoader = false;
|
||||||
$scope.isLoaderShow = false;
|
$scope.isLoaderShow = false;
|
||||||
$scope.isLoaderTxt = "Loading...";
|
$scope.isLoaderTxt = "Loading...";
|
||||||
|
$scope.generateButtonTxt = "GENERATE";
|
||||||
|
$scope.generateButtonStatus = false;
|
||||||
|
|
||||||
// sorting function for table params
|
// sorting function for table params
|
||||||
$scope.sort = function(keyname){
|
$scope.sort = function(keyname){
|
||||||
@ -234,7 +236,8 @@ $scope.isLoaderTxt = "Loading...";
|
|||||||
var university = $scope.myModel.universityName;
|
var university = $scope.myModel.universityName;
|
||||||
var course = $scope.myModel.courseName;
|
var course = $scope.myModel.courseName;
|
||||||
var batch = $scope.myModel.batchName;
|
var batch = $scope.myModel.batchName;
|
||||||
|
$scope.generateButtonTxt = "Please Wait...";
|
||||||
|
$scope.generateButtonStatus = true;
|
||||||
var dataForHallTicket = {
|
var dataForHallTicket = {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
url: apiPoint.url + 'getHallTicket/',
|
url: apiPoint.url + 'getHallTicket/',
|
||||||
@ -263,6 +266,9 @@ $scope.isLoaderTxt = "Loading...";
|
|||||||
$scope.pdfModel.semDataType =response.data.semDataType;
|
$scope.pdfModel.semDataType =response.data.semDataType;
|
||||||
|
|
||||||
$scope.open($scope.pdfModel);
|
$scope.open($scope.pdfModel);
|
||||||
|
$scope.generateButtonTxt = "GENERATE";
|
||||||
|
$scope.generateButtonStatus = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
},function(error){ swal('No Records Found','',error); });
|
},function(error){ swal('No Records Found','',error); });
|
||||||
}
|
}
|
||||||
|
|||||||
@ -71,7 +71,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-2 form-group">
|
<div class="col-md-2 form-group">
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
Batch Name
|
Batch Name
|
||||||
</label>
|
</label>
|
||||||
|
|||||||
@ -110,7 +110,7 @@
|
|||||||
<div class="col-md-3 form-group">
|
<div class="col-md-3 form-group">
|
||||||
<!-- <div class="pull-right"> -->
|
<!-- <div class="pull-right"> -->
|
||||||
<br>
|
<br>
|
||||||
<button type="button" ladda="ldloading1.zoom_in" tabindex="6" class="btn btn-wide btn-success" data-style="zoom-in" ng-click="generateHallTicket();">GENERATE</button>
|
<button type="button" ladda="ldloading1.zoom_in" tabindex="6" class="btn btn-wide btn-success" data-style="zoom-in" ng-diabled = "{{generateButtonStatus}}"ng-click="generateHallTicket();">{{generateButtonTxt}}</button>
|
||||||
<!-- </div> -->
|
<!-- </div> -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user