From 852b4571eace88f7a419eda06bdc41e39d05643c Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Tue, 16 Oct 2018 12:52:59 +0530 Subject: [PATCH] mark card email --- .../models/StatusUpdation_model.php | 69 +++++++++++++++---- 1 file changed, 55 insertions(+), 14 deletions(-) diff --git a/Apollo/api/application/models/StatusUpdation_model.php b/Apollo/api/application/models/StatusUpdation_model.php index 99789a1f..68e94998 100755 --- a/Apollo/api/application/models/StatusUpdation_model.php +++ b/Apollo/api/application/models/StatusUpdation_model.php @@ -117,18 +117,19 @@ class StatusUpdation_model extends CI_Model { $getlastansbookstatus = $this->GetLastAns_status($arr[0]['StudentID'],$arr[0]['Sem'],$arr[0]['CourseID']); -$latestappstatus=''; - if(!empty($getlastansbookstatus)) - { +// $latestappstatus=''; +// if(!empty($getlastansbookstatus)) +// { - foreach($getlastansbookstatus as $get) - { - $latestappstatus= $get->ListCode; - } - } +// foreach($getlastansbookstatus as $get) +// { +// $latestappstatus= $get->ListCode; +// } +// } +$upperresult=strtoupper($getlastansbookstatus); -// echo $latestappstatus; +// echo $upperresult; // die(); if($answerBookletStatus['isIssueToStudentExist'] == 0 && $answerBookletStatus['statusCount'] != 0) { @@ -138,11 +139,12 @@ $latestappstatus=''; $studentName = $this->getStudentName($arr[0]['StudentID']); $CmntToMsg = $arr[0]['Comments']; $statuToMsg = $this->get_status_name_ListCode($arr[0]['ListCode']); - - - +//echo $latestappstatus;die(); // $cerNamtToMsg = $this->get_certificate_name($arr[0]['CertificationType']); - if( ($statuToMsg == 'received' || $statuToMsg == 'Received' || $statuToMsg == 'RECEIVED') && $latestappstatus == 'S057'){ + if( ($statuToMsg == 'received' || $statuToMsg == 'Received' || $statuToMsg == 'RECEIVED') && $upperresult == 'RECEIVED'){ + + + // echo 'if';die(); $cerNamtToMsg = 'Mark Card'; $getSemYearMsg = $this->get_couser_sem_yr_msg($arr[0]['CourseID']); $getSemYearANDType = "$getSemYearMsg $cerNamtToMsg"; @@ -155,6 +157,8 @@ $latestappstatus=''; // echo $statuToMsg; // die(); } else if($statuToMsg == 'issued' || $statuToMsg == 'Issued' || $statuToMsg == 'ISSUED') { + + echo 'else if';die(); $cerNamtToMsg = 'Mark Card'; $getSemYearMsg = $this->get_couser_sem_yr_msg($arr[0]['CourseID']); $getSemYearANDType = "$getSemYearMsg $cerNamtToMsg"; @@ -616,6 +620,8 @@ $latestappstatus=''; // Your new password for logging into Apollo student portal is (Password). Please change the password as soon as you login. // This is the template to be used. public function smssend($arr, $msg) { + + $number = array(); foreach ($arr as $ar) { $mobi = $this->get_registered_mobile($ar['StudentID']); @@ -1082,7 +1088,42 @@ $this->db->insert_batch('T_BroadcastStatus', $data); $expense = $query->result(); - return $expense; + //print_r($expense);die(); + + $latestappstatus=''; + + if(!empty($expense)) + { + + foreach($expense as $get) + { + $latestappstatus= $get->ListCode; + } + } + + //echo $latestappstatus;die(); + + + + $this->db->select('ListCode,ListName'); + $this->db->from('T_PickListDetails'); + $this->db->where('T_PickListDetails.ListCode',$latestappstatus); + + $Type = $this->db->get(); + $TypeName = $Type->result(); + + + + $LastListname=''; + foreach($TypeName as $ty) + { + $LastListname= $ty->ListName; + } + + //echo $LastListname;die(); + + + return $LastListname; } }