From c7ea3c3fb93ff2cb3237412596d5a10546277285 Mon Sep 17 00:00:00 2001 From: sriramv Date: Thu, 31 Jan 2019 18:44:32 +0530 Subject: [PATCH] 1596 duplicate course remove --- Apollo/api/application/models/Studentview_model.php | 5 +++-- Apollo/assets/views/student/studentView.html | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Apollo/api/application/models/Studentview_model.php b/Apollo/api/application/models/Studentview_model.php index f0a8d974..42c7a3d3 100755 --- a/Apollo/api/application/models/Studentview_model.php +++ b/Apollo/api/application/models/Studentview_model.php @@ -118,7 +118,7 @@ class Studentview_model extends CI_Model $this->db->join( BRANCH . ' as BR', 'BR.BranchCode = SCU.BranchID'); $this->db->join( COURSE . ' as CU', 'CU.CourseID = SCU.CourseID'); $this->db->join( UNIVERSITY . ' as US', 'US.UniversityID = SCU.UniversityID AND SCU.BranchID=US.BranchCode'); - $this->db->join( ADMISSIONS .' as AD','AD.StudentID = SCU.StudentID and AD.UniversityID = SCU.UniversityID','LEFT'); + $this->db->join( ADMISSIONS .' as AD','AD.StudentID = SCU.StudentID and AD.UniversityID = SCU.UniversityID and AD.CourseID = CU.CourseID '); $this->db->where('SCU.StudentID',$studentId); if($accessFrom == 'Web'){ $this->db->where('BR.Is_StudentWebAccessActive', 1); @@ -175,11 +175,12 @@ class Studentview_model extends CI_Model $this->db->where('StudentID',$studentId); $subQuery = $this->db->get_compiled_select();*/ // subquery end + $this->db->distinct(); $this->db->select('SCU.EnrollmentID,CU.CourseID,CU.CourseName,US.UniversityID,US.UniversityName,US.UniversityShortName,AD.CreatedOn,AD.AdmittedBy'); $this->db->from( STUDENTCOURSE . ' as SCU'); $this->db->join( COURSE . ' as CU', 'CU.CourseID = SCU.CourseID'); $this->db->join( UNIVERSITY . ' as US', 'US.UniversityID = SCU.UniversityID AND SCU.BranchID=US.BranchCode'); - $this->db->join( ADMISSIONS .' as AD','AD.StudentID = SCU.StudentID and AD.UniversityID = SCU.UniversityID','LEFT'); + $this->db->join( ADMISSIONS .' as AD','AD.StudentID = SCU.StudentID and AD.UniversityID = SCU.UniversityID and AD.CourseID = CU.CourseID '); // $this->db->join(STUDENTS_FEES_PAID . ' as SFP','SFP.StudentID = SCU.StudentID '); // $this->db->join(STUDENTS_FEES_STATUS . ' as SFS','SFS.FeesID = SFP.FeesId and SFS.StudentID = SFP.StudentID'); diff --git a/Apollo/assets/views/student/studentView.html b/Apollo/assets/views/student/studentView.html index 91ca2259..30197778 100755 --- a/Apollo/assets/views/student/studentView.html +++ b/Apollo/assets/views/student/studentView.html @@ -229,7 +229,7 @@

{{course.UniversityName}} / {{course.CourseName}}

--> -

+

{{course.CourseName}} @@ -238,7 +238,7 @@