issues
This commit is contained in:
parent
bfb55ecc49
commit
2c5c20701c
@ -108,9 +108,28 @@ class StatusUpdation_model extends CI_Model {
|
||||
//If condition for Check ANSWERBOOKLET_STATUS, If it is null or 'Issued to Student' for do not send sms.
|
||||
|
||||
$answerBookletStatus = $this->getAnswerBookletStatus($arr[0]['StudentID'],$arr[0]['CourseID'],$arr[0]['BranchCode'],$arr[0]['Sem']);
|
||||
//print_r($answerBookletStatus);die();
|
||||
//print_r($answerBookletStatus);
|
||||
|
||||
// echo $answerBookletStatus['ListName'];
|
||||
// die();
|
||||
//echo "COURSE ====$arr[0]['CourseID']";
|
||||
// echo "PARENT -- $answerBookletStatus";
|
||||
|
||||
$getlastansbookstatus = $this->GetLastAns_status($arr[0]['StudentID'],$arr[0]['Sem'],$arr[0]['CourseID']);
|
||||
|
||||
$latestappstatus='';
|
||||
if(!empty($getlastansbookstatus))
|
||||
{
|
||||
|
||||
foreach($getlastansbookstatus as $get)
|
||||
{
|
||||
$latestappstatus= $get->ListCode;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// echo $latestappstatus;
|
||||
// die();
|
||||
if($answerBookletStatus['isIssueToStudentExist'] == 0 && $answerBookletStatus['statusCount'] != 0)
|
||||
{
|
||||
//echo "SEND SMS";
|
||||
@ -119,8 +138,11 @@ class StatusUpdation_model extends CI_Model {
|
||||
$studentName = $this->getStudentName($arr[0]['StudentID']);
|
||||
$CmntToMsg = $arr[0]['Comments'];
|
||||
$statuToMsg = $this->get_status_name_ListCode($arr[0]['ListCode']);
|
||||
|
||||
|
||||
|
||||
// $cerNamtToMsg = $this->get_certificate_name($arr[0]['CertificationType']);
|
||||
if( $statuToMsg == 'received' || $statuToMsg == 'Received' || $statuToMsg == 'RECEIVED'){
|
||||
if( ($statuToMsg == 'received' || $statuToMsg == 'Received' || $statuToMsg == 'RECEIVED') && $latestappstatus == 'S057'){
|
||||
$cerNamtToMsg = 'Mark Card';
|
||||
$getSemYearMsg = $this->get_couser_sem_yr_msg($arr[0]['CourseID']);
|
||||
$getSemYearANDType = "$getSemYearMsg $cerNamtToMsg";
|
||||
@ -128,6 +150,10 @@ class StatusUpdation_model extends CI_Model {
|
||||
$mesg = "$cerNamtToMsg Received - Dear $studentName, Your $getSemYearANDType had been received, Please come and collect it.";
|
||||
$this->smssend($arr, $mesg);
|
||||
$this->mailsend($arr, $mesg, $cerNamtToMsg);
|
||||
|
||||
|
||||
// echo $statuToMsg;
|
||||
// die();
|
||||
} else if($statuToMsg == 'issued' || $statuToMsg == 'Issued' || $statuToMsg == 'ISSUED') {
|
||||
$cerNamtToMsg = 'Mark Card';
|
||||
$getSemYearMsg = $this->get_couser_sem_yr_msg($arr[0]['CourseID']);
|
||||
@ -891,6 +917,9 @@ class StatusUpdation_model extends CI_Model {
|
||||
//echo "FINAL RES SEND TO PARENT";
|
||||
// print_r($data);
|
||||
// die();
|
||||
|
||||
// print_r($this->db->last_query());
|
||||
// die();
|
||||
return $data;
|
||||
}
|
||||
|
||||
@ -972,4 +1001,26 @@ class StatusUpdation_model extends CI_Model {
|
||||
}
|
||||
return $resultArr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function GetLastAns_status($StudentID,$Sem,$CourseID)
|
||||
{
|
||||
$subQuery = 'select T_AnswerBookletStatus.ListCode,ListName from T_AnswerBookletStatus
|
||||
join T_PickListDetails on T_AnswerBookletStatus.ListCode=T_PickListDetails.ListCode
|
||||
where T_AnswerBookletStatus.StudentID=? and
|
||||
T_AnswerBookletStatus.CreatedOn=(select max(CreatedOn) from T_AnswerBookletStatus
|
||||
where StudentID= ?) and Sem=? and CourseID=?';
|
||||
|
||||
$query = $this->db->query($subQuery,array($StudentID,$StudentID,$Sem,$CourseID));
|
||||
|
||||
$expense = $query->result();
|
||||
|
||||
return $expense;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -242,7 +242,9 @@ app.controller('markcardStatusCtrl', ["$scope", "toaster", "$filter", "ngTablePa
|
||||
|
||||
// Select one row in a table once
|
||||
$scope.setOneSelect = function (value) {
|
||||
// alert();
|
||||
// alert();
|
||||
|
||||
// return false;
|
||||
angular.forEach($scope.searchResultDetails, function (item) {
|
||||
item.Selected = false;
|
||||
});
|
||||
@ -366,6 +368,9 @@ app.controller('markcardStatusCtrl', ["$scope", "toaster", "$filter", "ngTablePa
|
||||
// Update the status For Certification
|
||||
$scope.statusUpdate = {
|
||||
submit: function (form, myStatusModel, localBranchDetails) {
|
||||
|
||||
// alert('in');
|
||||
// return false;
|
||||
var firstError = null;
|
||||
if (form.$invalid) {
|
||||
var field = null, firstError = null;
|
||||
|
||||
@ -279,7 +279,7 @@
|
||||
</style>
|
||||
|
||||
|
||||
<tab heading="New/Re-Reg Forms" id="addstudent" ng-click="addStudentView()">
|
||||
<tab heading="Add Student" id="addstudent" ng-click="addStudentView()">
|
||||
<div ng-hide="inActiveBranchStatus == true">
|
||||
<div ng-if="existingStudentView == false">
|
||||
<form name="Form" id="form" novalidate ng-submit="studentFORM.submit(Form, myModel)" method="post">
|
||||
|
||||
@ -312,7 +312,7 @@
|
||||
</style>
|
||||
|
||||
|
||||
<tab tabindex="6" active="tabactive2" ng-click="tabActive('tabactive1');addStudentView()" heading="New/Re-Reg Forms" id="addstudent">
|
||||
<tab tabindex="6" active="tabactive2" ng-click="tabActive('tabactive1');addStudentView()" heading="Add Student" id="addstudent">
|
||||
<!--<button ng-click="tabActive('0')" value="Tab1">Tab1</button>-->
|
||||
<div ng-if="existingStudentView == false">
|
||||
<!--<button ng-click="myActivateDiv()">Click Me</button>-->
|
||||
|
||||
Loading…
Reference in New Issue
Block a user