Merge remote-tracking branch 'origin/master'

This commit is contained in:
gandhimathi 2018-02-08 15:34:10 +05:30
commit 80c271ebe9
5 changed files with 46 additions and 33 deletions

View File

@ -105,9 +105,7 @@ class StatusUpdation_model extends CI_Model
$cerNamtToMsg = 'MARK CARD'; $cerNamtToMsg = 'MARK CARD';
$getSemYearMsg = $this->get_couser_sem_yr_msg($arr[0]['CourseID']); $getSemYearMsg = $this->get_couser_sem_yr_msg($arr[0]['CourseID']);
$mesg = "Status Update : $cerNamtToMsg $getSemYearMsg - $statuToMsg $dateToMsg."; $mesg = "Status Update : $cerNamtToMsg $getSemYearMsg - $statuToMsg $dateToMsg.";
// $mesg = "Status Update : $cerNamtToMsg - $statuToMsg $dateToMsg."; // $mesg = "Status Update : $cerNamtToMsg - $statuToMsg $dateToMsg.";
$this->smssend($arr, $mesg); $this->smssend($arr, $mesg);
} }
@ -335,8 +333,8 @@ class StatusUpdation_model extends CI_Model
FROM ".COURSE_FEES." as CF LEFT JOIN ".STUDENTS_FEES_STATUS." as SFS ON SFS.FeesType = CF.ID FROM ".COURSE_FEES." as CF LEFT JOIN ".STUDENTS_FEES_STATUS." as SFS ON SFS.FeesType = CF.ID
WHERE WHERE
SFS.CourseID = '$reqData' SFS.CourseID = '$reqData'
AND SFS.StudentID = '$stuFor' AND SFS.StudentID = '$stuFor'";
AND CF.ProgramType ='Y001'"; // AND CF.ProgramType ='Y001'";
$queryDetails = $this->db->query($subQuery); $queryDetails = $this->db->query($subQuery);
$results['semYearResult'] = true; $results['semYearResult'] = true;

View File

@ -164,8 +164,10 @@ class Student_model extends CI_Model
// print_r($getSearchData);exit(); // print_r($getSearchData);exit();
$this->db->select('*'); $this->db->select('*');
$this->db->from(STUDENTS); $this->db->from(STUDENTS);
$this->db->order_by('CreatedOn', 'DESC');
$this->db->where('BranchCode', $loginUserBranchId); $this->db->where('BranchCode', $loginUserBranchId);
$this->db->group_by('user_id');
$this->db->order_by('CreatedOn', 'DESC');
$stuDetails = $this->db->get(); $stuDetails = $this->db->get();
$checkArr = $stuDetails->result(); $checkArr = $stuDetails->result();
if (count($checkArr) > 0) { if (count($checkArr) > 0) {
@ -190,8 +192,8 @@ class Student_model extends CI_Model
// $Batch = $getSearchData['Batch']; // $Batch = $getSearchData['Batch'];
$Batch=''; $Batch='';
$StuStatus = $getSearchData['Status']; $StuStatus = $getSearchData['Status'];
if($StuStatus == '' ){ if($StuStatus == '' ){
$subQuery = "SELECT S.* $subQuery = "SELECT S.*
FROM ".STUDENTS." as S LEFT JOIN ".STUDENTCOURSE." as SC ON SC.StudentID = S.StudentID FROM ".STUDENTS." as S LEFT JOIN ".STUDENTCOURSE." as SC ON SC.StudentID = S.StudentID
LEFT JOIN ".UNIVERSITY." as U ON SC.UniversityID = U.UniversityID LEFT JOIN ".COURSE." as C ON LEFT JOIN ".UNIVERSITY." as U ON SC.UniversityID = U.UniversityID LEFT JOIN ".COURSE." as C ON
SC.CourseID = C.CourseID SC.CourseID = C.CourseID
@ -201,8 +203,8 @@ if($StuStatus == '' ){
AND S.BranchCode = '$loginUserBranchId' AND S.BranchCode = '$loginUserBranchId'
GROUP BY SC.StudentID GROUP BY SC.StudentID
ORDER BY S.CreatedOn"; ORDER BY S.CreatedOn";
} else { } else {
$subQuery = "SELECT S.* $subQuery = "SELECT S.*
FROM ".STUDENTS." as S LEFT JOIN ".STUDENTCOURSE." as SC ON SC.StudentID = S.StudentID FROM ".STUDENTS." as S LEFT JOIN ".STUDENTCOURSE." as SC ON SC.StudentID = S.StudentID
LEFT JOIN ".UNIVERSITY." as U ON SC.UniversityID = U.UniversityID LEFT JOIN ".COURSE." as C ON LEFT JOIN ".UNIVERSITY." as U ON SC.UniversityID = U.UniversityID LEFT JOIN ".COURSE." as C ON
SC.CourseID = C.CourseID SC.CourseID = C.CourseID
@ -233,10 +235,14 @@ if($StuStatus == '' ){
// list for admin // list for admin
if($getSearchData["University"] === '' && $getSearchData["Course"] === '' && $getSearchData["Status"] === '') { if($getSearchData["University"] === '' && $getSearchData["Course"] === '' && $getSearchData["Status"] === '') {
// print_r($getSearchData);exit(); // print_r($getSearchData);exit();
$this->db->select('*');
$this->db->from(STUDENTS); $this->db->select('t1.*');
$this->db->order_by('CreatedOn', 'DESC'); $this->db->from('' . STUDENTS . ' as t1');
$this->db->where('BranchCode', $loginUserBranchId); $this->db->join('' . STUDENTCOURSE . ' as t2', 't2.StudentID = t1.StudentID', 'LEFT');
$this->db->where('t2.BranchID', $loginUserBranchId);
$this->db->group_by('t2.StudentID');
// $this->db->from(STUDENTS);
$this->db->order_by('t2.CreatedOn', 'DESC');
$stuDetails = $this->db->get(); $stuDetails = $this->db->get();
$checkArr = $stuDetails->result(); $checkArr = $stuDetails->result();
if (count($checkArr) > 0) { if (count($checkArr) > 0) {
@ -257,35 +263,40 @@ if($StuStatus == '' ){
// $this->db->where('t2.CourseID', $getSearchData["Course"]); // $this->db->where('t2.CourseID', $getSearchData["Course"]);
$University = $getSearchData['University']; $University = $getSearchData['University'];
$Course = $getSearchData['Course']; $Course = $getSearchData['Course'];
// $Batch = $getSearchData['Batch']; // $Batch = $getSearchData['Batch'];
$Batch=''; $Batch='';
$StuStatus = $getSearchData['Status']; $StuStatus = $getSearchData['Status'];
if($StuStatus == '' ){ if($StuStatus == '' ){
$subQuery = "SELECT S.* $subQuery = "SELECT S.*
FROM ".STUDENTS." as S LEFT JOIN ".STUDENTCOURSE." as SC ON SC.StudentID = S.StudentID FROM ".STUDENTS." as S LEFT JOIN ".STUDENTCOURSE." as SC ON SC.StudentID = S.StudentID
LEFT JOIN ".UNIVERSITY." as U ON SC.UniversityID = U.UniversityID LEFT JOIN ".COURSE." as C ON LEFT JOIN ".UNIVERSITY." as U ON SC.UniversityID = U.UniversityID LEFT JOIN ".COURSE." as C ON
SC.CourseID = C.CourseID SC.CourseID = C.CourseID
WHERE WHERE
SC.UniversityID LIKE '%$University%' SC.UniversityID LIKE '%$University%'
AND SC.CourseID LIKE '%$Course%' AND SC.CourseID LIKE '%$Course%'
AND S.BranchCode = '$loginUserBranchId' AND SC.BranchID = '$loginUserBranchId'
GROUP BY SC.StudentID GROUP BY SC.StudentID
ORDER BY S.CreatedOn"; ORDER BY S.CreatedOn";
} else { // ### query branch code changed from student branch code to student course branch code
$subQuery = "SELECT S.* //AND S.BranchCode = '$loginUserBranchId' -> SC.BranchCode = '$loginUserBranchId'
} else {
$subQuery = "SELECT S.*
FROM ".STUDENTS." as S LEFT JOIN ".STUDENTCOURSE." as SC ON SC.StudentID = S.StudentID FROM ".STUDENTS." as S LEFT JOIN ".STUDENTCOURSE." as SC ON SC.StudentID = S.StudentID
LEFT JOIN ".UNIVERSITY." as U ON SC.UniversityID = U.UniversityID LEFT JOIN ".COURSE." as C ON LEFT JOIN ".UNIVERSITY." as U ON SC.UniversityID = U.UniversityID LEFT JOIN ".COURSE." as C ON
SC.CourseID = C.CourseID SC.CourseID = C.CourseID
WHERE WHERE
SC.UniversityID LIKE '%$University%' SC.UniversityID LIKE '%$University%'
AND SC.CourseID LIKE '%$Course%' AND SC.CourseID LIKE '%$Course%'
AND S.IsActive = '$StuStatus' AND S.IsActive = '$StuStatus'
AND S.BranchCode = '$loginUserBranchId' AND SC.BranchID = '$loginUserBranchId'
GROUP BY SC.StudentID GROUP BY SC.StudentID
ORDER BY S.CreatedOn"; ORDER BY S.CreatedOn";
} // ### query branch code changed from student branch code to student course branch code
//AND S.BranchCode = '$loginUserBranchId' -> SC.BranchCode = '$loginUserBranchId'
}
$stuDetails = $this->db->query($subQuery); $stuDetails = $this->db->query($subQuery);
// $stuDetails = $this->db->get(); // $stuDetails = $this->db->get();
@ -465,8 +476,9 @@ if($StuStatus == '' ){
// add student // add student
public function add_student($Arr, $courseArr, $imagename, $imageSource, $size) public function add_student($Arr, $courseArr, $imagename, $imageSource, $size)
{ {
if($this->getBranchActiveStatusforStuAdd($courseArr['BranchID']) === '1'){ // echo $this->getBranchActiveStatusforStuAdd($courseArr['BranchID'])['branch_active_status'];exit();
if($this->getBranchActiveStatusforStuAdd($courseArr['BranchID'])['branch_active_status'] === '1'){
// echo 'in';exit();
if( $imageSource == '') { // add employee without image if( $imageSource == '') { // add employee without image
$imageNameDb = 'default.jpeg'; $imageNameDb = 'default.jpeg';
$Arr['ProfilePicPath'] = "student/".$imageNameDb; $Arr['ProfilePicPath'] = "student/".$imageNameDb;

View File

@ -4,7 +4,7 @@
* Simple table with sorting and filtering on AngularJS * Simple table with sorting and filtering on AngularJS
*/ */
app.controller('loginCtrl', ["$scope", "$http", "API_POINTS", "$state", '$rootScope', '$cookies', 'md5', 'ipCookie', "SweetAlert", function ($scope, $http, apiPoint, $state, $rootScope, $cookies, md5, ipCookie, SweetAlert) { app.controller('loginCtrl', ["$scope", "$http", "API_POINTS", "$state", '$rootScope', '$cookies', 'md5', 'ipCookie', "SweetAlert", "$window", function ($scope, $http, apiPoint, $state, $rootScope, $cookies, md5, ipCookie, SweetAlert, $window) {
/** /**
* login details capture * login details capture
* by : kdk * by : kdk
@ -50,7 +50,7 @@ app.controller('loginCtrl', ["$scope", "$http", "API_POINTS", "$state", '$rootSc
$http(req).then(function (response) { $http(req).then(function (response) {
if (response.data.loginStatus == true) { if (response.data.loginStatus == true) {
$scope.responseData = response.data.details; $scope.responseData = response.data.details;
/* /*
* After logined user details store to local client detail * After logined user details store to local client detail
*/ */
@ -67,10 +67,11 @@ app.controller('loginCtrl', ["$scope", "$http", "API_POINTS", "$state", '$rootSc
localStorage.setItem('localObj', JSON.stringify($scope.localStore)); localStorage.setItem('localObj', JSON.stringify($scope.localStore));
if($scope.responseData.ListCode=='R001'){ if($scope.responseData.ListCode=='R001'){
$state.go('app.studentView'); $state.go('app.studentView');
} }
else{ else{
// $window.location.reload();
$state.go('app.dashboard'); $state.go('app.dashboard');
// $window.location.reload();
} }
} else { } else {

View File

@ -12,6 +12,8 @@ app.controller('sessionCtrl', ["$scope", "$localStorage", "$state", 'ipCookie',
var localDetail = JSON.parse(localStorage.getItem('localObj')); var localDetail = JSON.parse(localStorage.getItem('localObj'));
var localDetails = ipCookie('cookiechk'); var localDetails = ipCookie('cookiechk');
// $window.location.reload();
$scope.getLoginDash = ''; $scope.getLoginDash = '';
if (localDetail != null) { if (localDetail != null) {
@ -128,6 +130,7 @@ app.controller('topnavCtrl', ["$scope", "$http", "API_POINTS", "$localStorage",
var localDetail = JSON.parse(localStorage.getItem('localObj')); var localDetail = JSON.parse(localStorage.getItem('localObj'));
var localDetails = ipCookie('cookiechk'); var localDetails = ipCookie('cookiechk');
$scope.init = function () { $scope.init = function () {
// $window.location.reload();
if (localDetail != null) { if (localDetail != null) {
$scope.getProfile(); $scope.getProfile();
} else { } else {
@ -145,7 +148,6 @@ app.controller('topnavCtrl', ["$scope", "$http", "API_POINTS", "$localStorage",
'branchList': '', 'branchList': '',
}; };
// client side logined details // client side logined details
$scope.getProfile = function () { $scope.getProfile = function () {
var req = { var req = {

View File

@ -808,7 +808,7 @@
<div class="pull-right"> <div class="pull-right">
<button type="submit" ng-disabled="disableButton" tabindex="36" ladda="ldloading1.zoom_in" class="btn btn-wide btn-success" <button type="submit" ng-disabled="disableButton" tabindex="36" ladda="ldloading1.zoom_in" class="btn btn-wide btn-success"
data-style="zoom-in"> data-style="zoom-in">
Submit Add
</button> </button>
<button type="reset" tabindex="37" class="btn btn-warning btn-wide" tabindex="32" ng-click="studentFORM.reset(Form)"> <button type="reset" tabindex="37" class="btn btn-warning btn-wide" tabindex="32" ng-click="studentFORM.reset(Form)">
Reset Reset