diff --git a/Apollo/api/application/models/StatusUpdation_model.php b/Apollo/api/application/models/StatusUpdation_model.php index 35c4aaf6..39e73c1f 100644 --- a/Apollo/api/application/models/StatusUpdation_model.php +++ b/Apollo/api/application/models/StatusUpdation_model.php @@ -64,7 +64,7 @@ class StatusUpdation_model extends CI_Model $result['message'] = "Something went wrong.please try again"; } return $result; - } + } // update certificate stauts public function update_certificateStatus($arr) { @@ -75,7 +75,7 @@ class StatusUpdation_model extends CI_Model $this->db->insert_batch(CERTIFICATION_STATUS, $arr); if ($this->db->affected_rows() >= 1) { // if( ($this->get_status_name_ListCode($arr[0]['ListCode']) == 'Received' || 'received' || 'RECEIVED') || ($this->get_status_name_ListCode($arr[0]['ListCode']) == 'Issued' || 'issued' || 'ISSUED')) { - if($this->get_status_name_ListCode($arr[0]['ListCode'])){ + if($this->get_ListCode_status($arr[0]['ListCode'])){ $dateToMsg = $arr[0]['CDate']; $statuToMsg = $this->get_status_name_ListCode($arr[0]['ListCode']); $cerNamtToMsg = $this->get_certificate_name($arr[0]['CertificationType']); @@ -120,13 +120,15 @@ class StatusUpdation_model extends CI_Model } // self function for getting the status for the LISTCODE - public function get_status_name_ListCode($listCode) { + public function get_ListCode_status($listCode) { + // print_r ($listCode);exit(); $this->db->select('ListName'); $this->db->from(PICK_LIST_DETAILS); $this->db->where('ListCode', $listCode); - $this->db->like('ListName', 'received'); - $this->db->like('ListName', 'issued'); + $this->db->or_like('ListName', 'RECEIVED'); + $this->db->or_like('ListName', 'ISSUED'); $statusDetails = $this->db->get()->first_row(); + // echo count($statusDetails);exit(); if ( count($statusDetails) == 1) { return true; } else { @@ -134,7 +136,15 @@ class StatusUpdation_model extends CI_Model } } - // self function for getting certificate name for the CERTIFICATECODE + public function get_status_name_ListCode($listCode) { + $this->db->select('ListName'); + $this->db->from(PICK_LIST_DETAILS); + $this->db->where('ListCode', $listCode); + $statusDetails = $this->db->get()->first_row(); + return $statusDetails->ListName; + } + + // self function for getting certificate name for the CERTIFICATECODE public function get_certificate_name($listCode) { $this->db->select('CertificateName'); $this->db->from(CERTIFICATION); @@ -146,7 +156,7 @@ class StatusUpdation_model extends CI_Model // update answer booklet status public function update_answerbooklet($arr) { // print_r($arr);exit(); - $this->db->insert_batch('ANSWER_BOOKLET', $arr); + $this->db->insert_batch(ANSWER_BOOKLET, $arr); if ($this->db->affected_rows() >= 1) { // $this->smssend($arr); $result['addStatus'] = true; @@ -160,11 +170,11 @@ class StatusUpdation_model extends CI_Model // update study material status public function update_semyear($arr) { - $this->get_status_name_ListCode($arr[0]['ListCode']); + // $this->get_status_name_ListCode($arr[0]['ListCode']); $this->db->insert_batch(STUDY_MATERIAL_STATUS, $arr); if ($this->db->affected_rows() >= 1) { // if(($this->get_status_name_ListCode($arr[0]['ListCode']) == 'Received' || 'received' || 'Active') || ($this->get_status_name_ListCode($arr[0]['ListCode']) == 'Issued' || 'issued')) { - if($this->get_status_name_ListCode($arr[0]['ListCode'])) { + if($this->get_ListCode_status($arr[0]['ListCode']) == true) { $dateToMsg = $arr[0]['SDate']; $statuToMsg = $this->get_status_name_ListCode($arr[0]['ListCode']); $cerNamtToMsg = 'Study Material'; @@ -179,7 +189,7 @@ class StatusUpdation_model extends CI_Model $result['message'] = "Something went wrong.please try again"; } return $result; - } + } // get sem/Year for the course public function get_semyear_result($reqData) { @@ -282,6 +292,7 @@ class StatusUpdation_model extends CI_Model // $mobile = "91$mobile"; $message = urlencode($msg); + // echo $mobile , $message; $ch=curl_init(); curl_setopt($ch,CURLOPT_URL,"https://smsapi.24x7sms.com/api_2.0/SendSMS.aspx?APIKEY=xegCdYUIMf3&MobileNo=".$mobile."&SenderID=APOLLO&Message=".$message."&ServiceName=TEMPLATE_BASED"); diff --git a/Apollo/assets/views/status-update/answer_booklet_status.html b/Apollo/assets/views/status-update/answer_booklet_status.html index 6ccc3dad..063e2b63 100644 --- a/Apollo/assets/views/status-update/answer_booklet_status.html +++ b/Apollo/assets/views/status-update/answer_booklet_status.html @@ -38,7 +38,7 @@ @@ -49,7 +49,7 @@ @@ -94,11 +94,24 @@