diff --git a/Apollo/api/application/controllers/Student_Controller.php b/Apollo/api/application/controllers/Student_Controller.php index b7fafb14..ca3eed1e 100644 --- a/Apollo/api/application/controllers/Student_Controller.php +++ b/Apollo/api/application/controllers/Student_Controller.php @@ -82,8 +82,8 @@ class Student_Controller extends REST_Controller { } public function getStudentCourseDetails_post() { - $studentID = $this->post('studentID'); - $studentCourse = $this->student_model->get_student_course( $studentID );// Check if the employee exist + $studentCourseID = $this->post('studentcourseId'); + $studentCourse = $this->student_model->get_student_course( $studentCourseID );// Check if the employee exist if ($studentCourse) { $studentCourse['status'] = REST_Controller::HTTP_OK; diff --git a/Apollo/api/application/models/Student_model.php b/Apollo/api/application/models/Student_model.php index 2ab9d86b..f4282497 100644 --- a/Apollo/api/application/models/Student_model.php +++ b/Apollo/api/application/models/Student_model.php @@ -111,10 +111,10 @@ class Student_model extends CI_Model } // get student course details - public function get_student_course($studentId) { + public function get_student_course($studentcourseId) { $this->db->select('*'); $this->db->from(STUDENTCOURSE); - $this->db->where('StudentID', $studentId); + $this->db->where('ID', $studentcourseId); $courseDetails = $this->db->get(); $checkArr = $courseDetails->result(); if (count($checkArr) > 0) { diff --git a/Apollo/assets/js/controllers/studentCtrl.js b/Apollo/assets/js/controllers/studentCtrl.js index e7c73f1c..b707824f 100644 --- a/Apollo/assets/js/controllers/studentCtrl.js +++ b/Apollo/assets/js/controllers/studentCtrl.js @@ -70,6 +70,7 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams", } } + $scope.getStudentList = function () { $scope.loader = true; var empListreq = { @@ -102,7 +103,7 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams", } $scope.setEditCourseId = function (id) { - $scope.stucour = ''; + $scope.list = false; $scope.getStudentCourseList(id); // $scope.getStudentCourseDetails(id); @@ -119,6 +120,7 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams", $scope.getStudentCourseList = function(studentId) { $scope.list = true; + $scope.courseEdit = false; var req = { method: 'POST', url: apiPoint.url + 'getStudentCourseList/', @@ -133,13 +135,14 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams", if (response.data.stuCourseDetails) { $scope.courseEditLoading = false; $scope.studentCourseList = response.data.course_details; - $scope.stucour = $scope.studentCourse[0]; + // $scope.stucour = $scope.studentCourse[0]; } else { } }); } - $scope.getStudentCourseDetails = function (studentId) { + $scope.getStudentCourseDetails = function (studentcourseID) { + $scope.stucour = ''; $scope.list = false; $scope.courseEdit = true; var req = { @@ -149,7 +152,7 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams", 'Content-Type': 'application/json' }, data: { - studentID: studentId + studentcourseId: studentcourseID } }; $http(req).then(function (response) { @@ -157,15 +160,6 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams", $scope.courseEditLoading = false; $scope.studentCourse = response.data.course_details; $scope.stucour = $scope.studentCourse[0]; - // $scope.branchArr = []; - // angular.forEach($scope.empBranchs, function (item, index) { - // // alert(item.BranchName); - // $scope.branchArr.push(item.BranchName); - // }); - // $scope.empBranchDetails = { - // arr: $scope.branchArr, - // } - // $scope.empRoleDetail = response.data.role_details[0]; } else { } }); diff --git a/Apollo/assets/views/student/editStudentCourseDetails.html b/Apollo/assets/views/student/editStudentCourseDetails.html index 33424fc1..60c38064 100644 --- a/Apollo/assets/views/student/editStudentCourseDetails.html +++ b/Apollo/assets/views/student/editStudentCourseDetails.html @@ -14,33 +14,42 @@
- - - - - - - - - - - - - - - - - - -
University - Course - Batch - Date of Join -
{{s.UniversityName}}{{s.CourseName}}{{s.BatchName}}{{s.DOJ}}Edit
+ + + University + + Course + + Batch + + Date of Join + + + + + + + {{s.UniversityName}} + {{s.CourseName}} + {{s.BatchName}} + {{s.DOJ}} + Edit + + + +
+
+
+ +
+
+
-
 {{studentCourse | json }} 
+