Merge remote-tracking branch 'origin/master'

This commit is contained in:
gandhimathi 2018-05-26 18:28:07 +05:30
commit 61ba4db5a6
5 changed files with 158 additions and 115 deletions

View File

@ -40,13 +40,16 @@ class Student_model extends CI_Model {
public function get_student_list($loginUserId, $loginUserBranchId, $loginUserType, $getSearchData) { public function get_student_list($loginUserId, $loginUserBranchId, $loginUserType, $getSearchData) {
if ($loginUserType == SUPER_ADMIN) { if ($loginUserType == SUPER_ADMIN) {
// list for super admin based on branch // list for super admin based on branch
if ($getSearchData["University"] === '' && $getSearchData["Course"] === '' && $getSearchData["Status"] === '') { if ($getSearchData["University"] === '' && $getSearchData["Course"] === '' && $getSearchData["Status"] === '') {
$this->db->select('t1.*'); $this->db->select('S.*, SC.id as Student_Course_id , U.UniversityName, C.CourseName');
$this->db->from('' . STUDENTS . ' as t1'); $this->db->from('' . STUDENTCOURSE . ' as SC');
$this->db->join('' . STUDENTCOURSE . ' as t2', 't2.StudentID = t1.StudentID', 'LEFT'); $this->db->join('' . STUDENTS . ' as S', 'S.StudentID = SC.StudentID', 'LEFT');
$this->db->where('t2.BranchID', $loginUserBranchId); $this->db->join('' . UNIVERSITY . ' as U', 'SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode', 'LEFT');
$this->db->group_by('t2.StudentID'); $this->db->join('' . COURSE . ' as C', 'SC.CourseID = C.CourseID AND SC.BranchID = C.BranchCode', 'LEFT');
$this->db->order_by('t2.CreatedOn', 'DESC'); $this->db->where('SC.BranchID', $loginUserBranchId);
// $this->db->group_by('t2.StudentID');
$this->db->order_by('SC.CreatedOn', 'DESC');
$stuDetails = $this->db->get(); $stuDetails = $this->db->get();
$checkArr = $stuDetails->result(); $checkArr = $stuDetails->result();
if (count($checkArr) > 0) { if (count($checkArr) > 0) {
@ -56,68 +59,76 @@ class Student_model extends CI_Model {
$results['studentList'] = false; $results['studentList'] = false;
} }
} else { } else {
// echo 'hi';
// exit();
$University = $getSearchData['University']; $University = $getSearchData['University'];
$Course = $getSearchData['Course']; $Course = $getSearchData['Course'];
$Batch = ''; $Batch = '';
$StuStatus = $getSearchData['Status']; $StuStatus = $getSearchData['Status'];
if ($StuStatus == '') { if ($StuStatus == '') {
if ($University != '' && $Course == '') { if ($University != '' && $Course == '') {
$subQuery = "SELECT S.* $subQuery = "SELECT S.*, SC.id as Student_Course_id , U.UniversityName, C.CourseName
FROM " . STUDENTS . " as S FROM " . STUDENTCOURSE . " as SC
LEFT JOIN " . STUDENTCOURSE . " as SC ON SC.StudentID = S.StudentID LEFT JOIN " . STUDENTS . " as S ON SC.StudentID = S.StudentID
LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode
LEFT JOIN " . COURSE . " as C ON SC.CourseID = C.CourseID AND SC.BranchID = C.BranchCode LEFT JOIN " . COURSE . " as C ON SC.CourseID = C.CourseID AND SC.BranchID = C.BranchCode
WHERE WHERE
SC.UniversityID = '$University' SC.UniversityID = '$University'
AND SC.BranchID = '$loginUserBranchId' AND SC.BranchID = '$loginUserBranchId'
GROUP BY SC.StudentID
ORDER BY S.CreatedOn"; ORDER BY S.CreatedOn";
// GROUP BY SC.StudentID
} else if ($University != '' && $Course != '') { } else if ($University != '' && $Course != '') {
$subQuery = "SELECT S.* $subQuery = "SELECT S.*, SC.id as Student_Course_id , U.UniversityName, C.CourseName
FROM " . STUDENTS . " as S FROM " . STUDENTCOURSE . " as SC
LEFT JOIN " . STUDENTCOURSE . " as SC ON SC.StudentID = S.StudentID LEFT JOIN " . STUDENTS . " as S ON SC.StudentID = S.StudentID
LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode
LEFT JOIN " . COURSE . " as C ON SC.CourseID = C.CourseID AND SC.BranchID = C.BranchCode LEFT JOIN " . COURSE . " as C ON SC.CourseID = C.CourseID AND SC.BranchID = C.BranchCode
WHERE WHERE
SC.CourseID = '$Course' AND SC.UniversityID = '$University' SC.CourseID = '$Course' AND SC.UniversityID = '$University'
AND SC.BranchID = '$loginUserBranchId' AND SC.BranchID = '$loginUserBranchId'
GROUP BY SC.StudentID
ORDER BY S.CreatedOn"; ORDER BY S.CreatedOn";
// $subStudentCourse = "SELECT S.StudentID,
// FROM " . STUDENTCOURSE . " as S
// LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode
// LEFT JOIN " . COURSE . " as C ON SC.CourseID = C.CourseID AND SC.BranchID = C.BranchCode
// "
} }
} else { } else {
if ($University != '' && $Course == '') { if ($University != '' && $Course == '') {
$subQuery = "SELECT S.* $subQuery = "SELECT S.*, SC.id as Student_Course_id , U.UniversityName, C.CourseName
FROM " . STUDENTS . " as S LEFT JOIN " . STUDENTCOURSE . " as SC ON SC.StudentID = S.StudentID FROM " . STUDENTCOURSE . " as SC LEFT JOIN " . STUDENTS . " as S ON SC.StudentID = S.StudentID
LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID LEFT JOIN " . COURSE . " as C ON LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID LEFT JOIN " . COURSE . " as C ON
SC.CourseID = C.CourseID SC.CourseID = C.CourseID
WHERE WHERE
SC.UniversityID = '$University' SC.UniversityID = '$University'
AND SC.BranchID = '$loginUserBranchId' AND SC.BranchID = '$loginUserBranchId'
AND S.IsActive = '$StuStatus' AND S.IsActive = '$StuStatus'
GROUP BY SC.StudentID
ORDER BY S.CreatedOn"; ORDER BY S.CreatedOn";
} else if ($University != '' && $Course != '') { } else if ($University != '' && $Course != '') {
$subQuery = "SELECT S.* $subQuery = "SELECT S.*, SC.id as Student_Course_id , U.UniversityName, C.CourseName
FROM " . STUDENTS . " as S FROM " . STUDENTCOURSE . " as SC
LEFT JOIN " . STUDENTCOURSE . " as SC ON SC.StudentID = S.StudentID LEFT JOIN " . STUDENTS . " as S ON SC.StudentID = S.StudentID
LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode
LEFT JOIN " . COURSE . " as C ON SC.CourseID = C.CourseID AND SC.BranchID = C.BranchCode LEFT JOIN " . COURSE . " as C ON SC.CourseID = C.CourseID AND SC.BranchID = C.BranchCode
WHERE WHERE
SC.CourseID = '$Course' AND SC.UniversityID = '$University' SC.CourseID = '$Course' AND SC.UniversityID = '$University'
AND SC.BranchID = '$loginUserBranchId' AND SC.BranchID = '$loginUserBranchId'
AND S.IsActive = '$StuStatus' AND S.IsActive = '$StuStatus'
GROUP BY SC.StudentID
ORDER BY S.CreatedOn"; ORDER BY S.CreatedOn";
} else { } else {
$subQuery = "SELECT S.* $subQuery = "SELECT S.*, SC.id as Student_Course_id , U.UniversityName, C.CourseName
FROM " . STUDENTS . " as S FROM " . STUDENTCOURSE . " as SC
LEFT JOIN " . STUDENTCOURSE . " as SC ON SC.StudentID = S.StudentID LEFT JOIN " . STUDENTS . " as S ON SC.StudentID = S.StudentID
LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode
LEFT JOIN " . COURSE . " as C ON SC.CourseID = C.CourseID AND SC.BranchID = C.BranchCode LEFT JOIN " . COURSE . " as C ON SC.CourseID = C.CourseID AND SC.BranchID = C.BranchCode
WHERE WHERE
SC.BranchID = '$loginUserBranchId' SC.BranchID = '$loginUserBranchId'
AND S.IsActive = '$StuStatus' AND S.IsActive = '$StuStatus'
GROUP BY SC.StudentID
ORDER BY S.CreatedOn"; ORDER BY S.CreatedOn";
} }
} }
@ -133,12 +144,14 @@ class Student_model extends CI_Model {
} else if ($loginUserType == ADMIN) { } else if ($loginUserType == ADMIN) {
// list for admin // list for admin
if ($getSearchData["University"] === '' && $getSearchData["Course"] === '' && $getSearchData["Status"] === '') { if ($getSearchData["University"] === '' && $getSearchData["Course"] === '' && $getSearchData["Status"] === '') {
$this->db->select('t1.*'); $this->db->select('S.*, SC.id as Student_Course_id , U.UniversityName, C.CourseName');
$this->db->from('' . STUDENTS . ' as t1'); $this->db->from('' . STUDENTCOURSE . ' as SC');
$this->db->join('' . STUDENTCOURSE . ' as t2', 't2.StudentID = t1.StudentID', 'LEFT'); $this->db->join('' . STUDENTS . ' as S', 'S.StudentID = SC.StudentID', 'LEFT');
$this->db->where('t2.BranchID', $loginUserBranchId); $this->db->join('' . UNIVERSITY . ' as U', 'SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode', 'LEFT');
$this->db->group_by('t2.StudentID'); $this->db->join('' . COURSE . ' as C', 'SC.CourseID = C.CourseID AND SC.BranchID = C.BranchCode', 'LEFT');
$this->db->order_by('t2.CreatedOn', 'DESC'); $this->db->where('SC.BranchID', $loginUserBranchId);
// $this->db->group_by('t2.StudentID');
$this->db->order_by('SC.CreatedOn', 'DESC');
$stuDetails = $this->db->get(); $stuDetails = $this->db->get();
$checkArr = $stuDetails->result(); $checkArr = $stuDetails->result();
if (count($checkArr) > 0) { if (count($checkArr) > 0) {
@ -154,63 +167,59 @@ class Student_model extends CI_Model {
$StuStatus = $getSearchData['Status']; $StuStatus = $getSearchData['Status'];
if ($StuStatus == '') { if ($StuStatus == '') {
if ($University != '' && $Course == '') { if ($University != '' && $Course == '') {
$subQuery = "SELECT S.* $subQuery = "SELECT S.*, SC.id as Student_Course_id , U.UniversityName, C.CourseName
FROM " . STUDENTS . " as S FROM " . STUDENTCOURSE . " as SC
LEFT JOIN " . STUDENTCOURSE . " as SC ON SC.StudentID = S.StudentID LEFT JOIN " . STUDENTS . " as S ON SC.StudentID = S.StudentID
LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode
LEFT JOIN " . COURSE . " as C ON SC.CourseID = C.CourseID AND SC.BranchID = C.BranchCode LEFT JOIN " . COURSE . " as C ON SC.CourseID = C.CourseID AND SC.BranchID = C.BranchCode
WHERE WHERE
SC.UniversityID = '$University' SC.UniversityID = '$University'
AND SC.BranchID = '$loginUserBranchId' AND SC.BranchID = '$loginUserBranchId'
GROUP BY SC.StudentID
ORDER BY S.CreatedOn"; ORDER BY S.CreatedOn";
} else if ($University != '' && $Course != '') { } else if ($University != '' && $Course != '') {
$subQuery = "SELECT S.* $subQuery = "SELECT S.* , SC.id as Student_Course_id , U.UniversityName, C.CourseName
FROM " . STUDENTS . " as S FROM " . STUDENTCOURSE . " as SC
LEFT JOIN " . STUDENTCOURSE . " as SC ON SC.StudentID = S.StudentID LEFT JOIN " . STUDENTS . " as S ON SC.StudentID = S.StudentID
LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode
LEFT JOIN " . COURSE . " as C ON SC.CourseID = C.CourseID AND SC.BranchID = C.BranchCode LEFT JOIN " . COURSE . " as C ON SC.CourseID = C.CourseID AND SC.BranchID = C.BranchCode
WHERE WHERE
SC.CourseID = '$Course' AND SC.UniversityID = '$University' SC.CourseID = '$Course' AND SC.UniversityID = '$University'
AND SC.BranchID = '$loginUserBranchId' AND SC.BranchID = '$loginUserBranchId'
GROUP BY SC.StudentID
ORDER BY S.CreatedOn"; ORDER BY S.CreatedOn";
} }
} else { } else {
if ($University != '' && $Course == '') { if ($University != '' && $Course == '') {
$subQuery = "SELECT S.* $subQuery = "SELECT S.*, SC.id as Student_Course_id , U.UniversityName, C.CourseName
FROM " . STUDENTS . " as S FROM " . STUDENTCOURSE . " as SC
LEFT JOIN " . STUDENTCOURSE . " as SC ON SC.StudentID = S.StudentID LEFT JOIN " . STUDENTS . " as S ON SC.StudentID = S.StudentID
LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode
LEFT JOIN " . COURSE . " as C ON SC.CourseID = C.CourseID AND SC.BranchID = C.BranchCode LEFT JOIN " . COURSE . " as C ON SC.CourseID = C.CourseID AND SC.BranchID = C.BranchCode
WHERE WHERE
SC.UniversityID = '$University' SC.UniversityID = '$University'
AND SC.BranchID = '$loginUserBranchId' AND SC.BranchID = '$loginUserBranchId'
AND S.IsActive = '$StuStatus' AND S.IsActive = '$StuStatus'
GROUP BY SC.StudentID
ORDER BY S.CreatedOn"; ORDER BY S.CreatedOn";
} else if ($University != '' && $Course != '') { } else if ($University != '' && $Course != '') {
$subQuery = "SELECT S.* $subQuery = "SELECT S.*, SC.id as Student_Course_id , U.UniversityName, C.CourseName
FROM " . STUDENTS . " as S FROM " . STUDENTCOURSE . " as SC
LEFT JOIN " . STUDENTCOURSE . " as SC ON SC.StudentID = S.StudentID LEFT JOIN " . STUDENTS . " as S ON SC.StudentID = S.StudentID
LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode
LEFT JOIN " . COURSE . " as C ON SC.CourseID = C.CourseID AND SC.BranchID = C.BranchCode LEFT JOIN " . COURSE . " as C ON SC.CourseID = C.CourseID AND SC.BranchID = C.BranchCode
WHERE WHERE
SC.CourseID = '$Course' AND SC.UniversityID = '$University' SC.CourseID = '$Course' AND SC.UniversityID = '$University'
AND SC.BranchID = '$loginUserBranchId' AND SC.BranchID = '$loginUserBranchId'
AND S.IsActive = '$StuStatus' AND S.IsActive = '$StuStatus'
GROUP BY SC.StudentID
ORDER BY S.CreatedOn"; ORDER BY S.CreatedOn";
} else { } else {
$subQuery = "SELECT S.* $subQuery = "SELECT S.*, SC.id as Student_Course_id , U.UniversityName, C.CourseName
FROM " . STUDENTS . " as S FROM " . STUDENTCOURSE . " as SC
LEFT JOIN " . STUDENTCOURSE . " as SC ON SC.StudentID = S.StudentID LEFT JOIN " . STUDENTS . " as S ON SC.StudentID = S.StudentID
LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode
LEFT JOIN " . COURSE . " as C ON SC.CourseID = C.CourseID AND SC.BranchID = C.BranchCode LEFT JOIN " . COURSE . " as C ON SC.CourseID = C.CourseID AND SC.BranchID = C.BranchCode
WHERE WHERE
SC.BranchID = '$loginUserBranchId' SC.BranchID = '$loginUserBranchId'
AND S.IsActive = '$StuStatus' AND S.IsActive = '$StuStatus'
GROUP BY SC.StudentID
ORDER BY S.CreatedOn"; ORDER BY S.CreatedOn";
} }
} }
@ -226,13 +235,15 @@ class Student_model extends CI_Model {
} else if ($loginUserType == EMPLOYEE) { } else if ($loginUserType == EMPLOYEE) {
// list for staff // list for staff
if ($getSearchData["University"] === '' && $getSearchData["Course"] === '' && $getSearchData["Status"] === '') { if ($getSearchData["University"] === '' && $getSearchData["Course"] === '' && $getSearchData["Status"] === '') {
$this->db->select("t1.*, IF(t3.ID > 0, '1' , '0') as Fee_paid_exist"); $this->db->select("S.*, IF(SFP.ID > 0, '1' , '0') as Fee_paid_exist , SC.id as Student_Course_id , U.UniversityName, C.CourseName");
$this->db->from('' . STUDENTS . ' as t1'); $this->db->from('' . STUDENTCOURSE . ' as SC');
$this->db->join('' . STUDENTCOURSE . ' as t2', 't2.StudentID = t1.StudentID', 'LEFT'); $this->db->join('' . STUDENTS . ' as S', 'S.StudentID = SC.StudentID', 'LEFT');
$this->db->join('' . STUDENTS_FEES_PAID . ' as t3', 't3.StudentID = t1.StudentID', 'LEFT'); $this->db->join('' . UNIVERSITY . ' as U', 'SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode', 'LEFT');
$this->db->where('t2.BranchID', $loginUserBranchId); $this->db->join('' . COURSE . ' as C', 'SC.CourseID = C.CourseID AND SC.BranchID = C.BranchCode', 'LEFT');
$this->db->group_by('t2.StudentID'); $this->db->join('' . STUDENTS_FEES_PAID . ' as SFP', 'SFP.StudentID = S.StudentID', 'LEFT');
$this->db->order_by('t2.CreatedOn', 'DESC'); $this->db->where('SC.BranchID', $loginUserBranchId);
$this->db->group_by('SC.id');
$this->db->order_by('SC.CreatedOn', 'DESC');
$stuDetails = $this->db->get(); $stuDetails = $this->db->get();
$checkArr = $stuDetails->result(); $checkArr = $stuDetails->result();
if (count($checkArr) > 0) { if (count($checkArr) > 0) {
@ -248,28 +259,28 @@ class Student_model extends CI_Model {
$StuStatus = $getSearchData['Status']; $StuStatus = $getSearchData['Status'];
if ($StuStatus == '') { if ($StuStatus == '') {
if ($University != '' && $Course == '') { if ($University != '' && $Course == '') {
$subQuery = "SELECT S.*, IF(SFP.ID > 0, '1' , '0') as Fee_paid_exist $subQuery = "SELECT S.*, IF(SFP.ID > 0, '1' , '0') as Fee_paid_exist , SC.id as Student_Course_id , U.UniversityName, C.CourseName
FROM " . STUDENTS . " as S FROM " . STUDENTCOURSE . " as SC
LEFT JOIN " . STUDENTCOURSE . " as SC ON SC.StudentID = S.StudentID LEFT JOIN " . STUDENTS . " as S ON SC.StudentID = S.StudentID
LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode
LEFT JOIN " . COURSE . " as C ON SC.CourseID = C.CourseID AND SC.BranchID = C.BranchCode LEFT JOIN " . COURSE . " as C ON SC.CourseID = C.CourseID AND SC.BranchID = C.BranchCode
LEFT JOIN " . STUDENTS_FEES_PAID . " as SFP ON SFP.StudentID = S.StudentID LEFT JOIN " . STUDENTS_FEES_PAID . " as SFP ON SFP.StudentID = S.StudentID
WHERE WHERE
SC.UniversityID = '$University' SC.UniversityID = '$University'
AND SC.BranchID = '$loginUserBranchId' AND SC.BranchID = '$loginUserBranchId'
GROUP BY SC.StudentID GROUP BY SC.id
ORDER BY S.CreatedOn"; ORDER BY S.CreatedOn";
} else if ($University != '' && $Course != '') { } else if ($University != '' && $Course != '') {
$subQuery = "SELECT S.*, IF(SFP.ID > 0, '1' , '0') as Fee_paid_exist $subQuery = "SELECT S.*, IF(SFP.ID > 0, '1' , '0') as Fee_paid_exist , SC.id as Student_Course_id , U.UniversityName, C.CourseName
FROM " . STUDENTS . " as S FROM " . STUDENTCOURSE . " as SC
LEFT JOIN " . STUDENTCOURSE . " as SC ON SC.StudentID = S.StudentID LEFT JOIN " . STUDENTS . " as S ON SC.StudentID = S.StudentID
LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode
LEFT JOIN " . COURSE . " as C ON SC.CourseID = C.CourseID AND SC.BranchID = C.BranchCode LEFT JOIN " . COURSE . " as C ON SC.CourseID = C.CourseID AND SC.BranchID = C.BranchCode
LEFT JOIN " . STUDENTS_FEES_PAID . " as SFP ON SFP.StudentID = S.StudentID LEFT JOIN " . STUDENTS_FEES_PAID . " as SFP ON SFP.StudentID = S.StudentID
WHERE WHERE
SC.CourseID = '$Course' AND SC.UniversityID = '$University' SC.CourseID = '$Course' AND SC.UniversityID = '$University'
AND SC.BranchID = '$loginUserBranchId' AND SC.BranchID = '$loginUserBranchId'
GROUP BY SC.StudentID GROUP BY SC.id
ORDER BY S.CreatedOn"; ORDER BY S.CreatedOn";
} // ### query branch code changed from student branch code to student course branch code } // ### query branch code changed from student branch code to student course branch code
// AND S.BranchCode = '$loginUserBranchId' -> SC.BranchCode = '$loginUserBranchId' // AND S.BranchCode = '$loginUserBranchId' -> SC.BranchCode = '$loginUserBranchId'
@ -277,9 +288,9 @@ class Student_model extends CI_Model {
// OR (SC.CourseID = '$Course' AND SC.UniversityID = '$University')) // OR (SC.CourseID = '$Course' AND SC.UniversityID = '$University'))
} else { } else {
if ($University != '' && $Course == '') { if ($University != '' && $Course == '') {
$subQuery = "SELECT S.*, IF(SFP.ID > 0, '1' , '0') as Fee_paid_exist $subQuery = "SELECT S.*, IF(SFP.ID > 0, '1' , '0') as Fee_paid_exist , SC.id as Student_Course_id , U.UniversityName, C.CourseName
FROM " . STUDENTS . " as S FROM " . STUDENTCOURSE . " as SC
LEFT JOIN " . STUDENTCOURSE . " as SC ON SC.StudentID = S.StudentID LEFT JOIN " . STUDENTS . " as S ON SC.StudentID = S.StudentID
LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode
LEFT JOIN " . COURSE . " as C ON SC.CourseID = C.CourseID AND SC.BranchID = C.BranchCode LEFT JOIN " . COURSE . " as C ON SC.CourseID = C.CourseID AND SC.BranchID = C.BranchCode
LEFT JOIN " . STUDENTS_FEES_PAID . " as SFP ON SFP.StudentID = S.StudentID LEFT JOIN " . STUDENTS_FEES_PAID . " as SFP ON SFP.StudentID = S.StudentID
@ -287,12 +298,12 @@ class Student_model extends CI_Model {
SC.UniversityID = '$University' SC.UniversityID = '$University'
AND SC.BranchID = '$loginUserBranchId' AND SC.BranchID = '$loginUserBranchId'
AND S.IsActive = '$StuStatus' AND S.IsActive = '$StuStatus'
GROUP BY SC.StudentID GROUP BY SC.id
ORDER BY S.CreatedOn"; ORDER BY S.CreatedOn";
} else if ($University != '' && $Course != '') { } else if ($University != '' && $Course != '') {
$subQuery = "SELECT S.*, IF(SFP.ID > 0, '1' , '0') as Fee_paid_exist $subQuery = "SELECT S.*, IF(SFP.ID > 0, '1' , '0') as Fee_paid_exist , SC.id as Student_Course_id , U.UniversityName, C.CourseName
FROM " . STUDENTS . " as S FROM " . STUDENTCOURSE . " as SC
LEFT JOIN " . STUDENTCOURSE . " as SC ON SC.StudentID = S.StudentID LEFT JOIN " . STUDENTS . " as S ON SC.StudentID = S.StudentID
LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode
LEFT JOIN " . COURSE . " as C ON SC.CourseID = C.CourseID AND SC.BranchID = C.BranchCode LEFT JOIN " . COURSE . " as C ON SC.CourseID = C.CourseID AND SC.BranchID = C.BranchCode
LEFT JOIN " . STUDENTS_FEES_PAID . " as SFP ON SFP.StudentID = S.StudentID LEFT JOIN " . STUDENTS_FEES_PAID . " as SFP ON SFP.StudentID = S.StudentID
@ -300,18 +311,18 @@ class Student_model extends CI_Model {
SC.CourseID = '$Course' AND SC.UniversityID = '$University' SC.CourseID = '$Course' AND SC.UniversityID = '$University'
AND SC.BranchID = '$loginUserBranchId' AND SC.BranchID = '$loginUserBranchId'
AND S.IsActive = '$StuStatus' AND S.IsActive = '$StuStatus'
GROUP BY SC.StudentID GROUP BY SC.id
ORDER BY S.CreatedOn"; ORDER BY S.CreatedOn";
} else { } else {
$subQuery = "SELECT S.* $subQuery = "SELECT S.*, IF(SFP.ID > 0, '1' , '0') as Fee_paid_exist , SC.id as Student_Course_id , U.UniversityName, C.CourseName
FROM " . STUDENTS . " as S FROM " . STUDENTCOURSE . " as SC
LEFT JOIN " . STUDENTCOURSE . " as SC ON SC.StudentID = S.StudentID LEFT JOIN " . STUDENTS . " as S ON SC.StudentID = S.StudentID
LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode
LEFT JOIN " . COURSE . " as C ON SC.CourseID = C.CourseID AND SC.BranchID = C.BranchCode LEFT JOIN " . COURSE . " as C ON SC.CourseID = C.CourseID AND SC.BranchID = C.BranchCode
WHERE WHERE
SC.BranchID = '$loginUserBranchId' SC.BranchID = '$loginUserBranchId'
AND S.IsActive = '$StuStatus' AND S.IsActive = '$StuStatus'
GROUP BY SC.StudentID GROUP BY SC.id
ORDER BY S.CreatedOn"; ORDER BY S.CreatedOn";
} }
// ### query branch code changed from student branch code to student course branch code // ### query branch code changed from student branch code to student course branch code
@ -357,9 +368,12 @@ class Student_model extends CI_Model {
// get student course details // get student course details
public function get_student_course($studentcourseId) { public function get_student_course($studentcourseId) {
$this->db->select('*'); $this->db->select('SC.* ,IF(SFP.ID > 0, '.'1'.' , '.'0'.') as Fee_paid_exist');
$this->db->from(STUDENTCOURSE); $this->db->from('' . STUDENTCOURSE . ' as SC');
$this->db->where('ID', $studentcourseId); $this->db->join('' . STUDENTS_FEES_STATUS . ' as SFS', 'SFS.StudentID = SC.StudentID AND SFS.CourseID = SC.CourseID AND SFS.BranchCode = SC.BranchID', 'LEFT');
$this->db->join('' . STUDENTS_FEES_PAID . ' as SFP', 'SFP.FeesId = SFS.FeesID', 'LEFT');
$this->db->group_by('SC.id');
$this->db->where('SC.ID', $studentcourseId);
$courseDetails = $this->db->get(); $courseDetails = $this->db->get();
$checkArr = $courseDetails->result(); $checkArr = $courseDetails->result();
if (count($checkArr) > 0) { if (count($checkArr) > 0) {

View File

@ -669,17 +669,17 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
$scope.editId = -1; $scope.editId = -1;
$scope.editCourseId = -1; $scope.editCourseId = -1;
$scope.setEditId = function (id) { $scope.setEditId = function (unique_id, id) {
$scope.editId = id; $scope.editId = unique_id;
$scope.editCourseId = -1; $scope.editCourseId = -1;
$scope.studentViewPage = -1; $scope.studentViewPage = -1;
} }
$scope.setEditCourseId = function (id) { $scope.setEditCourseId = function (unique_id,id) {
$scope.list = false; $scope.list = false;
$scope.getStudentCourseList(id); $scope.getStudentCourseList(id);
$scope.currentStudentId = id; $scope.currentStudentId = id;
$scope.editCourseId = id; $scope.editCourseId = unique_id;
$scope.editId = -1; $scope.editId = -1;
$scope.courseEditLoading = true; $scope.courseEditLoading = true;
} }
@ -1662,17 +1662,17 @@ app.controller('studentSuperAdminCtrl', ["$scope", "toaster", "$filter", "ngTabl
$scope.editId = -1; $scope.editId = -1;
$scope.editCourseId = -1; $scope.editCourseId = -1;
$scope.setEditId = function (id) { $scope.setEditId = function (uniqe_id ,id) {
$scope.editId = id; $scope.editId = uniqe_id;
$scope.editCourseId = -1; $scope.editCourseId = -1;
} }
$scope.setEditCourseId = function (id) { $scope.setEditCourseId = function (uniqe_id ,id) {
$scope.list = false; $scope.list = false;
$scope.getStudentCourseList(id); $scope.getStudentCourseList(id);
$scope.currentStudentId = id; $scope.currentStudentId = id;
// $scope.getStudentCourseDetails(id); // $scope.getStudentCourseDetails(id);
$scope.editCourseId = id; $scope.editCourseId = uniqe_id;
$scope.editId = -1; $scope.editId = -1;
$scope.courseEditLoading = true; $scope.courseEditLoading = true;
} }

View File

@ -44,7 +44,8 @@
<td>{{s.Specilization2}}</td> <td>{{s.Specilization2}}</td>
<!--<td>{{s.SessionName}}</td>--> <!--<td>{{s.SessionName}}</td>-->
<td>{{s.DOJ}}</td> <td>{{s.DOJ}}</td>
<td ng-hide="s.Fee_paid_exist == 1 && localUserType == 'R002'" ng-click="getStudentCourseDetails(s.ID)"><i class="fa fa-edit"></i></td> <td ng-click="getStudentCourseDetails(s.ID)"><i class="fa fa-edit"></i></td>
<!--ng-hide="s.Fee_paid_exist == 1 && localUserType == 'R002'"-->
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -73,7 +74,7 @@
</label> </label>
<select ng-init="onSlecetUnivEdit(stucour.UniversityID, stucour.CourseID)" class="form-control" name="univ" ng-model="stucour.UniversityID" <select ng-init="onSlecetUnivEdit(stucour.UniversityID, stucour.CourseID)" class="form-control" name="univ" ng-model="stucour.UniversityID"
class="cs-select cs-skin-elastic" ng-change="onChangeSlecetUnivEdit(stucour.UniversityID)" class="cs-select cs-skin-elastic" ng-change="onChangeSlecetUnivEdit(stucour.UniversityID)"
required> ng-disabled="stucour.Fee_paid_exist == 1 && localUserType == 'R002'" required>
<option value="" disabled selected>Select University</option> <option value="" disabled selected>Select University</option>
<option ng-repeat="items in universityData" value="{{items.UniversityID}}" ng-selected="stucour.UniversityID == items.UniversityID">{{items.UniversityName}}</option> <option ng-repeat="items in universityData" value="{{items.UniversityID}}" ng-selected="stucour.UniversityID == items.UniversityID">{{items.UniversityName}}</option>
@ -102,8 +103,8 @@
<label> <label>
Course<span class="symbol required"></span> Course<span class="symbol required"></span>
</label> </label>
<ui-select ng-model="stuCourseEditDetailsObj.selected" name="course" theme="bootstrap" ng-required="true" ng-change="editStudentCourseDetailsChanges(stuCourseEditDetailsObj)"> <ui-select ng-model="stuCourseEditDetailsObj.selected" name="course" ng-disabled="stucour.Fee_paid_exist == 1 && localUserType == 'R002'" theme="bootstrap" ng-required="true" ng-change="editStudentCourseDetailsChanges(stuCourseEditDetailsObj)">
<ui-select-match placeholder="Select Course"> <ui-select-match placeholder="Select Course" >
{{$select.selected.CourseName}} {{$select.selected.CourseName}}
</ui-select-match> </ui-select-match>
<ui-select-choices value repeat="item in courseDataEditScrn | filter: $select.search"> <ui-select-choices value repeat="item in courseDataEditScrn | filter: $select.search">
@ -127,7 +128,7 @@
<input type="text" placeholder="Enter Specilization 1" <input type="text" placeholder="Enter Specilization 1"
tabindex="30" class="form-control" name="specilization1" tabindex="30" class="form-control" name="specilization1"
ng-model="stucour.Specilization1" ng-pattern="/^[a-zA-Z0-9-./\s]*$/" /> ng-disabled="stucour.Fee_paid_exist == 1 && localUserType == 'R002'" ng-model="stucour.Specilization1" ng-pattern="/^[a-zA-Z0-9-./\s]*$/" />
<span class="error text-small block" <span class="error text-small block"
ng-if="Form.specilization1.$dirty && Form.specilization1.$error.pattern">Invalid Specilization 1 </span> ng-if="Form.specilization1.$dirty && Form.specilization1.$error.pattern">Invalid Specilization 1 </span>
</div> </div>
@ -139,7 +140,7 @@
<input type="text" placeholder="Enter Specilization 2" <input type="text" placeholder="Enter Specilization 2"
tabindex="31" class="form-control" name="specilization2" tabindex="31" class="form-control" name="specilization2"
ng-model="stucour.Specilization2" ng-pattern="/^[a-zA-Z0-9-./\s]*$/" /> ng-disabled="stucour.Fee_paid_exist == 1 && localUserType == 'R002'" ng-model="stucour.Specilization2" ng-pattern="/^[a-zA-Z0-9-./\s]*$/" />
<span class="error text-small block" <span class="error text-small block"
ng-if="Form.specilization2.$dirty && Form.specilization2.$error.pattern">Invalid Specilization 2 </span> ng-if="Form.specilization2.$dirty && Form.specilization2.$error.pattern">Invalid Specilization 2 </span>
</div> </div>
@ -161,12 +162,12 @@
</label> </label>
<input type="text" tabindex="8" class="form-control " ng-click="startOpen = !startOpen" datepicker-popup="dd-MM-yyyy" ng-model="stucour.DOJ" <input type="text" tabindex="8" class="form-control " ng-click="startOpen = !startOpen" datepicker-popup="dd-MM-yyyy" ng-model="stucour.DOJ"
is-open="startOpen" ng-init="startOpen = false" name="dateofjoining" datepicker-options="dateOptions" is-open="startOpen" ng-init="startOpen = false" name="dateofjoining" datepicker-options="dateOptions"
placeholder="Select Date of Joining" close-text="Close" required="required" max-date="todayDate"/> ng-disabled="stucour.Fee_paid_exist == 1 && localUserType == 'R002'" placeholder="Select Date of Joining" close-text="Close" required="required" max-date="todayDate"/>
<span class="error text-small block" ng-if="Form.dateofjoining.$dirty && Form.dateofjoining.$error.required">Date of Joining is required</span> <span class="error text-small block" ng-if="Form.dateofjoining.$dirty && Form.dateofjoining.$error.required">Date of Joining is required</span>
</div> </div>
<div ng-hide="stucour.Fee_paid_exist == 1 && localUserType == 'R002'">
<div class="col-md-4"> <div class="col-md-4" >
<label> <label>
Active/De-Active Active/De-Active
</label> </label>
@ -186,7 +187,22 @@
<span class="error text-small block" ng-if="Form.DeactiveComments.$dirty && Form.DeactiveComments.$invalid">De-Active Comments is required</span> <span class="error text-small block" ng-if="Form.DeactiveComments.$dirty && Form.DeactiveComments.$invalid">De-Active Comments is required</span>
</div> </div>
</div>
<div ng-show="stucour.Fee_paid_exist == 1 && localUserType == 'R002'">
<div class="col-md-4" >
<label>
Active/De-Active
</label>
<div ng-if="stucour.IsActive==true">
<label ng-init="stucour.IsActive = true"> Active </label>
<!--<switch ng-model="stucour.IsActive" ng-init="stucour.IsActive = true" class="green"></switch>-->
</div>
<div ng-if="stucour.IsActive==false">
<label ng-init="stucour.IsActive = false"> In-Active </label>
<!--<switch ng-model="stucour.IsActive" ng-init="stucour.IsActive = false" class="green"></switch>-->
</div>
</div>
</div>
</div> </div>

View File

@ -175,6 +175,12 @@
</th> </th>
<th ng-click="sort('Fathername')">Father Name <th ng-click="sort('Fathername')">Father Name
<span class="glyphicon sort-icon" ng-show="sortKey=='Fathername'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span> <span class="glyphicon sort-icon" ng-show="sortKey=='Fathername'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
</th>
<th>University
<!--<span class="glyphicon sort-icon" ng-show="sortKey=='UniversityName'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>-->
</th>
<th>Course
<!--<span class="glyphicon so/rt-icon" ng-show="sortKey=='CourseName'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>-->
</th> </th>
<th ng-click="sort('Fathername')">Status <th ng-click="sort('Fathername')">Status
<span class="glyphicon sort-icon" ng-show="sortKey=='Fathername'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span> <span class="glyphicon sort-icon" ng-show="sortKey=='Fathername'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
@ -195,14 +201,13 @@
</td> </td>
<td> <td>
<a tooltip="View Student" ng-click="open(p);" class="text-dark"> <a tooltip="View Student" ng-click="open(p);" class="text-dark">
{{p.Firstname}} {{p.Lastname}} {{p.Firstname}} {{p.Lastname}}
</a> </a>
</td> </td>
<td>{{p.Fathername}}</td> <td>{{p.Fathername}}</td>
<td>{{p.UniversityName}}</td>
<td>{{p.CourseName}}</td>
<td><span ng-if="p.IsActive == true" style="text-transform: uppercase; text-shadow: 1px 1px #166307; color: #2be209 ">ACTIVE</span> <td><span ng-if="p.IsActive == true" style="text-transform: uppercase; text-shadow: 1px 1px #166307; color: #2be209 ">ACTIVE</span>
<span tooltip="{{p.DeactiveComments}}" ng-if="p.IsActive == false" style="text-transform: uppercase; text-shadow: 1px 1px rgb(167, 88, 15); color: rgba(236, 24, 24, 0.98823529);">DEACTIVE</span></td> <span tooltip="{{p.DeactiveComments}}" ng-if="p.IsActive == false" style="text-transform: uppercase; text-shadow: 1px 1px rgb(167, 88, 15); color: rgba(236, 24, 24, 0.98823529);">DEACTIVE</span></td>
<td> <td>
@ -211,16 +216,16 @@
<td style="text-align: center;"> <td style="text-align: center;">
<!--<input type=button class="btn btn-info btn-xs" ladda="ldloading1.zoom_in" id="editRowBtn{{p.StudentID}}" value="Personal Details" <!--<input type=button class="btn btn-info btn-xs" ladda="ldloading1.zoom_in" id="editRowBtn{{p.StudentID}}" value="Personal Details"
ng-click="setEditId(p.StudentID);">--> ng-click="setEditId(p.StudentID);">-->
<i class="ti-user" tooltip="Personal Details" ng-click="setEditId(p.StudentID);"></i> <i class="ti-user" tooltip="Personal Details" ng-click="setEditId(p.Student_Course_id, p.StudentID);"></i>
<!--<input type=button class="btn btn-blue btn-xs" id="editCourseRowBtn{{p.StaffID}}" value="Course Details" ng-click="setEditCourseId(p.StudentID);">--> <!--<input type=button class="btn btn-blue btn-xs" id="editCourseRowBtn{{p.StaffID}}" value="Course Details" ng-click="setEditCourseId(p.StudentID);">-->
<i class="ti-write" tooltip="Course Details" ng-click="setEditCourseId(p.StudentID);"></i> <i class="ti-write" tooltip="Course Details" ng-click="setEditCourseId(p.Student_Course_id, p.StudentID);"></i>
</td> </td>
</tr> </tr>
<tr ng-show="editId === p.StudentID" ng-if="editId === p.StudentID"> <tr ng-show="editId === p.Student_Course_id" ng-if="editId === p.Student_Course_id">
<td colspan="6" ng-include src="'assets/views/student/editStudentDetails.html'"></td> <td colspan="8" ng-include src="'assets/views/student/editStudentDetails.html'"></td>
</tr> </tr>
<tr ng-show="editCourseId === p.StudentID" ng-if="editCourseId === p.StudentID"> <tr ng-show="editCourseId === p.Student_Course_id" ng-if="editCourseId === p.Student_Course_id">
<td colspan="6" ng-include src="'assets/views/student/editStudentCourseDetails.html'"></td> <td colspan="8" ng-include src="'assets/views/student/editStudentCourseDetails.html'"></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>

View File

@ -211,6 +211,12 @@
</th> </th>
<th ng-click="sort('Fathername')">Father Name <th ng-click="sort('Fathername')">Father Name
<span class="glyphicon sort-icon" ng-show="sortKey=='Fathername'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span> <span class="glyphicon sort-icon" ng-show="sortKey=='Fathername'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
</th>
<th>University
<!--<span class="glyphicon sort-icon" ng-show="sortKey=='UniversityName'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>-->
</th>
<th>Course
<!--<span class="glyphicon so/rt-icon" ng-show="sortKey=='CourseName'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>-->
</th> </th>
<th ng-click="sort('Fathername')">Status <th ng-click="sort('Fathername')">Status
<span class="glyphicon sort-icon" ng-show="sortKey=='Fathername'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span> <span class="glyphicon sort-icon" ng-show="sortKey=='Fathername'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
@ -237,22 +243,24 @@
</td> </td>
<td>{{p.Fathername}}</td> <td>{{p.Fathername}}</td>
<td>{{p.UniversityName}}</td>
<td>{{p.CourseName}}</td>
<td><span ng-if="p.IsActive == true" style="text-transform: uppercase; text-shadow: 1px 1px #166307; color: #2be209 ">ACTIVE</span> <td><span ng-if="p.IsActive == true" style="text-transform: uppercase; text-shadow: 1px 1px #166307; color: #2be209 ">ACTIVE</span>
<span tooltip="{{p.DeactiveComments}}" ng-if="p.IsActive == false" style="text-transform: uppercase; text-shadow: 1px 1px rgb(167, 88, 15); color: rgba(236, 24, 24, 0.98823529);">DEACTIVE</span></td> <span tooltip="{{p.DeactiveComments}}" ng-if="p.IsActive == false" style="text-transform: uppercase; text-shadow: 1px 1px rgb(167, 88, 15); color: rgba(236, 24, 24, 0.98823529);">DEACTIVE</span></td>
<td><div id="containersPara">{{p.Comments}}</div></td> <td><div id="containersPara">{{p.Comments}}</div></td>
<td style="text-align: center;"> <td style="text-align: center;">
<!--<input type=button class="btn btn-info btn-xs" ladda="ldloading1.zoom_in" id="editRowBtn{{p.StudentID}}" value="Personal Details" <!--<input type=button class="btn btn-info btn-xs" ladda="ldloading1.zoom_in" id="editRowBtn{{p.StudentID}}" value="Personal Details"
ng-click="setEditId(p.StudentID);">--> ng-click="setEditId(p.StudentID);">-->
<i class="ti-user" tooltip="Personal Details" id="personalDetailButton" ng-click="setEditId(p.StudentID);"></i> <i class="ti-user" tooltip="Personal Details" id="personalDetailButton" ng-click="setEditId(p.Student_Course_id, p.StudentID);"></i>
<!--<input type=button class="btn btn-blue btn-xs" id="editCourseRowBtn{{p.StaffID}}" value="Course Details" ng-click="setEditCourseId(p.StudentID);">--> <!--<input type=button class="btn btn-blue btn-xs" id="editCourseRowBtn{{p.StaffID}}" value="Course Details" ng-click="setEditCourseId(p.StudentID);">-->
<i class="ti-write" tooltip="Course Details" ng-click="setEditCourseId(p.StudentID);"></i> <i class="ti-write" tooltip="Course Details" ng-click="setEditCourseId(p.Student_Course_id, p.StudentID);"></i>
</td> </td>
</tr> </tr>
<tr ng-show="editId === p.StudentID" ng-if="editId === p.StudentID"> <tr ng-show="editId === p.Student_Course_id" ng-if="editId === p.Student_Course_id">
<td colspan="6" ng-include src="'assets/views/student/editStudentDetails.html'"></td> <td colspan="8" ng-include src="'assets/views/student/editStudentDetails.html'"></td>
</tr> </tr>
<tr ng-show="editCourseId === p.StudentID" ng-if="editCourseId === p.StudentID"> <tr ng-show="editCourseId === p.Student_Course_id" ng-if="editCourseId === p.Student_Course_id">
<td colspan="6" ng-include src="'assets/views/student/editStudentCourseDetails.html'"></td> <td colspan="8" ng-include src="'assets/views/student/editStudentCourseDetails.html'"></td>
</tr> </tr>
</tbody> </tbody>