This commit is contained in:
dineshkumarkannan 2018-09-11 18:53:53 +05:30
commit 0dbc1b27c3
8 changed files with 362 additions and 16 deletions

View File

@ -1362,7 +1362,7 @@ $result['updatedraftStatus'] = false;
$this->db->join(FORMFEESRECEIVEDFROMUNIV.' as UNFR', 'UNFR.ID = UNCD.FormMapID','left');
$this->db->join(UNIVERSITYPAYMENT.' as UNP', 'UNP.PID = UNCD.PaymentMapID','left');
$this->db->join(ENROLMENTRECEIVEDFROMUNIV.' as ENU', 'ENU.FormID = UNFR.FormID','left');
$this->db->order_by('UNCD.ApprovedDate','DESC');
$this->db->order_by('UNCD.ApprovedDate','ASC');
$this->db->where('UNCD.UniversityCode',$search['UniversityCode']);
$this->db->order_by('UNCD.UniversityName',$search['UniversityName']);
$details = $this->db->get();

View File

@ -73,13 +73,31 @@ class Studentview_model extends CI_Model
$result['studentInfo'] = "";
}
}
// requestedFrom 4 for based on form get student details
else if ($requestFrom =='4'){
$this->db->select('ST.*');
$this->db->from( LOGIN . ' as LO');
$this->db->join( STUDENTS . ' as ST', 'LO.StaffID = ST.StudentID');
$this->db->join( STUDENTCOURSE . ' as STC', 'STC.StudentID = ST.StudentID');
$this->db->where('ST.MobileNumber', $requestedBy);
$studentDetails = $this->db->get()->first_row();
if($studentDetails){
$result['studentStatus'] = true;
$result['studentDetails'] = $studentDetails;
// get student course details
$result['courseDetails'] = $this->getFormStudentCourse($studentDetails->StudentID,$requestFrom);
}
else{
$result['studentStatus'] = false;
$result['studentInfo'] = "";
}
}
return $result;
}
public function getStudentCourseStudentLogin($studentId=null,$requestFrom=null,$requestedBranch=null,$accessFrom=null){
// this sub query for avoid university duplicate id
$this->db->select('SCU.EnrollmentID,CU.CourseID,CU.CourseName,US.UniversityID,US.UniversityName,US.UniversityShortName');
$this->db->from( STUDENTCOURSE . ' as SCU');
@ -189,6 +207,53 @@ class Studentview_model extends CI_Model
return $studentCourseStatus;
}
/*
* get student course details
* created by kms
* */
public function getFormStudentCourse($studentId=null,$requestFrom=null){
$this->db->select('SCU.EnrollmentID,CU.CourseID,CU.CourseName,US.UniversityID,US.UniversityName,US.UniversityShortName');
$this->db->from( STUDENTCOURSE . ' as SCU');
$this->db->join( COURSE . ' as CU', 'CU.CourseID = SCU.CourseID');
$this->db->join( UNIVERSITY . ' as US', 'US.UniversityID = SCU.UniversityID AND SCU.BranchID=US.BranchCode');
$this->db->where('SCU.StudentID',$studentId);
$courseDetails = $this->db->get();
if($courseDetails->result()){
$studentCourseStatus['status'] = true;
foreach ($courseDetails->result() as $row){
$fetchData['CourseID']=$row->CourseID;
$fetchData['CourseName']=$row->CourseName;
$fetchData['UniversityID']=$row->UniversityID;
$fetchData['UniversityName']=$row->UniversityName;
$fetchData['UniveShortName'] = $row->UniversityShortName;
// $fetchData['SessionName']=$row->SessionName;
$fetchData['EnrollmentID']=$row->EnrollmentID;
// get student fees details
$fetchData['feesDetails']=$this->getStudentFeesDetails($studentId,$row->CourseID);
// get student boollet details
$fetchData['studyMaterialDetails']=$this->getStudentMaterialDetails($studentId,$row->CourseID);
// get application details
if($requestFrom!='2'){
$fetchData['applicationDetails']=$this->getStudentApplicationDetails($studentId,$row->CourseID);
$fetchData['answerbookletDetails']=$this->getStudentAnswerbookletDetails($studentId,$row->CourseID);
}
$fetchData['certificateDetails']=$this->getStudentCertificateDetails($studentId,$row->CourseID);
// get student Mark crad details
$fetchData['markCardDetails']=$this->getMarkcardDetails($studentId,$row->CourseID);
$CourseArray[]=$fetchData;
}
$studentCourseStatus['courseStatus'] = $CourseArray;
}
else{
$studentCourseStatus['status'] = false;
}
return $studentCourseStatus;
}
/*
* get student fees details

View File

@ -121,7 +121,7 @@
"formupload": {
"MAIN": "UNIVERSITY FORMS",
"ENROLLMENT": "Enrollment",
"STUDENTFEEDETAILCOMPARE": "Form Enrolment",
"STUDENTFEEDETAILCOMPARE": "Form Enrollment",
"STUDENTFROMIDFEEDETAILS": "Form Fees",
"UNIVERSITYFORMPAYMENT": "Payment"
},

View File

@ -726,3 +726,134 @@ $scope.exportDataTab3 = function () {
}
}]);
/*modal controller
* */
app.controller('studentModalDemoCtrl', ["$scope", "$rootScope", "$modal", "$log", "API_POINTS", "$http", function ($scope, $rootScope, $modal, $log,apiPoint,$http) {
//Tooltip for print button
$scope.dynamicTooltip = 'Student View';
// $scope.items = ['item1', 'item2', 'item3'];
$scope.open = function (studentDetails) {
// get student view details
var getcourse = {
method: 'POST',
url: apiPoint.url + 'getStudentBasicInfo/',
headers: {
'Content-Type': 'application/json'
},
data: {
requestedBy :studentDetails.MobileNumber,
requestedFrom: 4,
branchCode : JSON.parse(localStorage.getItem('localObj')).localBranchID
}
};
$http(getcourse).then(function (response) {
if (response.data.status == 200 && response.data.studentStatus== true) {
$scope.courseEditLoading = false;
// $scope.studentDetails = response.data.studentDetails;
$scope.studentDetails = response.data;
// $scope.courseDetails = response.data.courseDetails;
var modalInstance = $modal.open({
templateUrl: 'assets/views/student/studentDetailsModal.html',
controller: 'ModalInstanceCtrl',
// size: size,
resolve: {
items: function () {
return $scope.studentDetails;
}
}
});
modalInstance.result.then(function (selectedItem) {
$scope.selected = selectedItem;
}, function () {
modalInstance.close();
});
} else {
swal("Failed!", "This student is not registerd", "warning");
$scope.courseEditLoading = false;
$scope.studentDetails = "";
$scope.courseDetails = "";
}
});
};
$scope.open1 = function (values,type) {
var modalInstance1 = $modal.open({
templateUrl: 'assets/views/student/studentPaymentModal.html',
controller: 'ModalInstanceCtrl1',
// size: size,
resolve: {
items1: function () {
var myvalues =
{
"values":values,
"type":type
};
return myvalues;
}
}
});
modalInstance1.result.then(function (selectedItem) {
$scope.selected = selectedItem;
}, function () {
modalInstance1.close();
});
};
$scope.printStudentDetails = function (details) {
$rootScope.pdfItems = details;
var printInstance = $modal.open({
templateUrl: 'assets/views/student/studentPdf.html',
controller: 'studentModalDemoCtrl',
});
};
// generate pdf for student view
$scope.export = function(getName) {
kendo.drawing.drawDOM($("#exportthis")).then(function(group) {
kendo.drawing.pdf.saveAs(group, getName+".pdf");
});
}
}]);
// Please note that $modalInstance represents a modal window (instance) dependency.
// It is not the same as the $modal service used above.
app.controller('ModalInstanceCtrl', ["$scope", "$modalInstance", "items","WordsService", function ($scope, $modalInstance, items,WordsService) {
$scope.items = items;
$scope.selected = {
item: $scope.items[0]
};
$scope.ok = function () {
$modalInstance.close($scope.selected.item);
};
$scope.cancel = function () {
$modalInstance.dismiss('cancel');
};
}]);
app.controller('ModalInstanceCtrl1', ["$scope", "$modalInstance", "items1","WordsService", function ($scope, $modalInstance, items1,WordsService) {
$scope.items1 = items1.values;
$scope.selectedtype = items1.type;
$scope.ok = function () {
$modalInstance.close($scope.selected.item);
};
$scope.cancel = function () {
$modalInstance.dismiss('cancel');
};
}]);

View File

@ -4,7 +4,7 @@
* Simple table with sorting and filtering on AngularJS
*/
app.controller('student_university_fee_compareCtrl', ["$scope", "toaster", "$filter", "ngTableParams", "$http", "API_POINTS", "$state", '$rootScope', '$cookies', 'md5', 'ipCookie', '$timeout', '$window', "flowFactory", "$interval", 'SweetAlert', function ($scope, toaster, $filter, ngTableParams, $http, apiPoint, $state, $rootScope, $cookies, md5, ipCookie, $timeout, $window, flowFactory, $interval, SweetAlert) {
app.controller('student_university_fee_compareCtrl', ["$scope", "toaster", "$filter", "ngTableParams", "$http", "API_POINTS", "$state", '$rootScope', '$cookies', 'md5', 'ipCookie', '$timeout', '$window', "flowFactory", "$interval", 'SweetAlert', '$modal', function ($scope, toaster, $filter, ngTableParams, $http, apiPoint, $state, $rootScope, $cookies, md5, ipCookie, $timeout, $window, flowFactory, $interval, SweetAlert, $modal) {
/**
* student university fee details compare
*/
@ -499,4 +499,137 @@ app.controller('student_university_fee_compareCtrl', ["$scope", "toaster", "$fil
}
}]);
/*modal controller
* */
app.controller('studentModalDemoCtrl', ["$scope", "$rootScope", "$modal", "$log", "API_POINTS", "$http", function ($scope, $rootScope, $modal, $log,apiPoint,$http) {
//Tooltip for print button
$scope.dynamicTooltip = 'Student View';
// $scope.items = ['item1', 'item2', 'item3'];
$scope.open = function (studentDetails) {
// get student view details
var getcourse = {
method: 'POST',
url: apiPoint.url + 'getStudentBasicInfo/',
headers: {
'Content-Type': 'application/json'
},
data: {
requestedBy :studentDetails.MobileNumber,
requestedFrom: 4,
branchCode : JSON.parse(localStorage.getItem('localObj')).localBranchID
}
};
$http(getcourse).then(function (response) {
if (response.data.status == 200 && response.data.studentStatus== true) {
$scope.courseEditLoading = false;
// $scope.studentDetails = response.data.studentDetails;
$scope.studentDetails = response.data;
// $scope.courseDetails = response.data.courseDetails;
var modalInstance = $modal.open({
templateUrl: 'assets/views/student/studentDetailsModal.html',
controller: 'ModalInstanceCtrl',
// size: size,
resolve: {
items: function () {
return $scope.studentDetails;
}
}
});
modalInstance.result.then(function (selectedItem) {
$scope.selected = selectedItem;
}, function () {
modalInstance.close();
});
} else {
swal("Failed!", "This student is not registerd", "warning");
$scope.courseEditLoading = false;
$scope.studentDetails = "";
$scope.courseDetails = "";
}
});
};
$scope.open1 = function (values,type) {
var modalInstance1 = $modal.open({
templateUrl: 'assets/views/student/studentPaymentModal.html',
controller: 'ModalInstanceCtrl1',
// size: size,
resolve: {
items1: function () {
var myvalues =
{
"values":values,
"type":type
};
return myvalues;
}
}
});
modalInstance1.result.then(function (selectedItem) {
$scope.selected = selectedItem;
}, function () {
modalInstance1.close();
});
};
$scope.printStudentDetails = function (details) {
$rootScope.pdfItems = details;
var printInstance = $modal.open({
templateUrl: 'assets/views/student/studentPdf.html',
controller: 'studentModalDemoCtrl',
});
};
// generate pdf for student view
$scope.export = function(getName) {
kendo.drawing.drawDOM($("#exportthis")).then(function(group) {
kendo.drawing.pdf.saveAs(group, getName+".pdf");
});
}
}]);
// Please note that $modalInstance represents a modal window (instance) dependency.
// It is not the same as the $modal service used above.
app.controller('ModalInstanceCtrl', ["$scope", "$modalInstance", "items","WordsService", function ($scope, $modalInstance, items,WordsService) {
$scope.items = items;
$scope.selected = {
item: $scope.items[0]
};
$scope.ok = function () {
$modalInstance.close($scope.selected.item);
};
$scope.cancel = function () {
$modalInstance.dismiss('cancel');
};
}]);
app.controller('ModalInstanceCtrl1', ["$scope", "$modalInstance", "items1","WordsService", function ($scope, $modalInstance, items1,WordsService) {
$scope.items1 = items1.values;
$scope.selectedtype = items1.type;
$scope.ok = function () {
$modalInstance.close($scope.selected.item);
};
$scope.cancel = function () {
$modalInstance.dismiss('cancel');
};
}]);

View File

@ -48,4 +48,22 @@ app.directive('disallowSpaces', function() {
});
}
};
});
app.filter('unique', function() {
return function(collection, primaryKey, secondaryKey) { //optional secondary key
var output = [],
keys = [];
angular.forEach(collection, function(item) {
var key;
secondaryKey === undefined ? key = item[primaryKey] : key = item[primaryKey][secondaryKey];
if(keys.indexOf(key) === -1) {
keys.push(key);
output.push(item);
}
});
return output;
};
});

View File

@ -43,7 +43,7 @@
<div class="row" ng-init="init()">
<tabset id="here" class="tabbable">
<tab tabindex="1" active="tabactive1" ng-click="tabActive('tabactive1')" heading="Matched Details" id="viewDetails">
<tab tabindex="1" active="tabactive1" ng-click="tabActive('tabactive1')" heading="View Matched" id="viewDetails">
<script>
$("#selectBranch").change(function () {
$("#searchIn").focus();
@ -52,7 +52,7 @@
});
</script>
<div class="col-md-12">
<button class="btn btn-sm btn-info" tabindex="2" style="float: right" ng-click="addManualEnrolemntDetails('1')">Add Enrollment Details</button>
<button class="btn btn-sm btn-info" tabindex="2" style="float: right" ng-click="addManualEnrolemntDetails('1')">Add Enrollment</button>
</div>
<div class="container" ng-show="enableEnrolment==true">
<form name="manualEnForm" id="manualEnForm" novalidate>
@ -214,11 +214,11 @@
<button class="btn btn-success btn-o" ng-click="exportData()" ng-if="studentData">Export to Excel</button>
</div>
<div class="table-responsive" ng-if="studentData">
<div class="table-responsive" ng-if="studentData" ng-controller="studentModalDemoCtrl">
<table class="table table-hover" >
<thead>
<tr>
<th> FormID
<th> Form ID
</th>
<th> Enrollment ID
</th>
@ -239,9 +239,7 @@
</thead>
<tbody dir-paginate="p in data|orderBy:sortKey:reverse|filter:search:strict|itemsPerPage:10| filter:query as results" pagination-id="matched">
<tr>
<td>
{{p.FormID}}
</td>
<td><a tooltip="View Student" class="text-dark" ng-click="open(p);"> {{p.FormID}}</a></td>
<td>{{p.EnrolmentNo}}</td>
<td>
{{p.FormType}}
@ -295,7 +293,7 @@
</div>
</div>
</tab>
<tab tabindex="13" active="tabactive2" ng-click="tabActive('tabactive2')" heading="Un-Matched Details" id="unmatchedRecord">
<tab tabindex="13" active="tabactive2" ng-click="tabActive('tabactive2')" heading="View Unmatched" id="unmatchedRecord">
<div class="col-md-3 form-group">
<label for="form-field-select-2">
@ -356,7 +354,7 @@
<div ng-if="unMatchedRecordDetailsType == 'EnrolmentIDFile'">
<table class="table table-border table-hover" >
<thead>
<th>FormID</th>
<th>Form ID</th>
<th>Enrollment ID</th>
<th>SemesterYear</th>
<th>MobileNumber</th>
@ -377,7 +375,8 @@
</thead>
<tbody dir-paginate="p in unMatchedRecordDetails|orderBy:sortKey:reverse|filter:search:strict|itemsPerPage:10| filter:query as results" pagination-id="unmatched">
<tr>
<td>{{p.FormID}}</td>
<td><a tooltip="View Student" class="text-dark" ng-click="open(p);">{{p.FormID}}</a></td>
<td ng-if="p.EnromentStatus==true">{{p.EnrolmentNo}}</td>
<td ng-if="p.EnromentStatus==false"><span class="text-red"><b>{{p.EnrolmentNo}}</b></span></td>
<td ng-if="p.SemStatus==true">{{p.SemesterYear}}</td>

View File

@ -109,7 +109,7 @@
<button class="btn btn-success btn-o" ng-click="exportData()">Export to Excel</button>
</div>
<div class="table-responsive" ng-if="studentData">
<div class="table-responsive" ng-if="studentData" ng-controller="studentModalDemoCtrl">
<table class="table table-hover">
<thead>
<tr>
@ -174,7 +174,7 @@
<i class="ti-plus" ng-if="p.AddToAccountStatus != 1" tooltip="Add to Account State" ng-click="addToAccountState(p.ID);"></i>
</td>
<td>
{{p.FormID}}
<a tooltip="View Student" class="text-dark" ng-click="open(p);"> {{p.FormID}}</a>
</td>
<td>
{{p.FormType}}