diff --git a/Apollo/api/application/models/Studentview_model.php b/Apollo/api/application/models/Studentview_model.php old mode 100644 new mode 100755 index 990b69da..d8cd0ba4 --- a/Apollo/api/application/models/Studentview_model.php +++ b/Apollo/api/application/models/Studentview_model.php @@ -60,7 +60,7 @@ class Studentview_model extends CI_Model // get student fees details $fetchData['feesDetails']=$this->getStudentFeesDetails($studentId,$row->CourseID); // get student boollet details - $fetchData['bookletDetails']=$this->getStudentBookletDetails($studentId,$row->CourseID); + $fetchData['studyMaterialDetails']=$this->getStudentMaterialDetails($studentId,$row->CourseID); // get certificate details $fetchData['certificateDetails']=$this->getStudentCertificateDetails($studentId,$row->CourseID); // get student application details @@ -136,21 +136,21 @@ class Studentview_model extends CI_Model } /* - * get student bool let details + * get student study material details * created by kms * */ - public function getStudentBookletDetails($studentID=null,$courseID=null){ - $this->db->select('AB.AnsDate,AB.Comments,CF.Sem_Year,PLD.ListName'); - $this->db->from(ANSWER_BOOKLET.' as AB'); - $this->db->join(COURSE_FEES.' as CF','CF.ID = AB.CourseID'); + public function getStudentMaterialDetails($studentID=null,$courseID=null){ + $this->db->select('SMS.SDate,SMS.Comments,CF.Sem_Year,PLD.ListName'); + $this->db->from(STUDY_MATERIAL_STATUS.' as SMS'); + $this->db->join(COURSE_FEES.' as CF','CF.ID = SMS.CourseID'); $this->db->join(COURSE.' as CU', 'CU.CourseID = CF.CourseID'); - $this->db->join(PICK_LIST_DETAILS.' as PLD', 'PLD.ListCode = AB.ListCode'); + $this->db->join(PICK_LIST_DETAILS.' as PLD', 'PLD.ListCode = SMS.ListCode'); $this->db->where('CU.CourseID', $courseID); - $this->db->where('AB.StudentID', $studentID); - $this->db->order_by('AB.ID', 'DESC'); - $getBoolDetails = $this->db->get(); - if ($getBoolDetails->result()){ - return $getBoolDetails->result(); + $this->db->where('SMS.StudentID', $studentID); + $this->db->order_by('SMS.ID', 'DESC'); + $getMaterialDetails = $this->db->get(); + if ($getMaterialDetails->result()){ + return $getMaterialDetails->result(); } else{ return false;