course details changes done

This commit is contained in:
gandhimathi 2018-01-22 17:52:22 +05:30
parent 29767bebe0
commit ccafe81776

View File

@ -16,23 +16,43 @@ class Studentview_model extends CI_Model
* */
// get student list based on login user
public function getStudentInfo($requestedBy=null)
public function getStudentInfo($requestedBy=null,$requestFrom=null)
{
$this->db->select('ST.*');
$this->db->from( LOGIN . ' as LO');
$this->db->join( STUDENTS . ' as ST', 'LO.StaffID = ST.StudentID');
$this->db->where('LO.ID', $requestedBy);
$studentDetails = $this->db->get()->first_row();
if($studentDetails){
$result['studentStatus'] = true;
$result['studentDetails'] = $studentDetails;
// get student course details
$result['courseDetails'] = $this->getStudentCourse($studentDetails->StudentID);
if($requestFrom !='1'){
$this->db->select('ST.*');
$this->db->from( LOGIN . ' as LO');
$this->db->join( STUDENTS . ' as ST', 'LO.StaffID = ST.StudentID');
$this->db->where('LO.ID', $requestedBy);
$studentDetails = $this->db->get()->first_row();
if($studentDetails){
$result['studentStatus'] = true;
$result['studentDetails'] = $studentDetails;
// get student course details
$result['courseDetails'] = $this->getStudentCourse($studentDetails->StudentID);
}
else{
$result['studentStatus'] = false;
$result['studentInfo'] = "";
}
}
else{
$result['studentStatus'] = false;
$result['studentInfo'] = "";
$this->db->select('ST.*');
$this->db->from( LOGIN . ' as LO');
$this->db->join( STUDENTS . ' as ST', 'LO.StaffID = ST.StudentID');
$this->db->where('ST.StudentID', $requestedBy);
$studentDetails = $this->db->get()->first_row();
if($studentDetails){
$result['studentStatus'] = true;
$result['studentDetails'] = $studentDetails;
// get student course details
$result['courseDetails'] = $this->getStudentCourse($studentDetails->StudentID);
}
else{
$result['studentStatus'] = false;
$result['studentInfo'] = "";
}
}
return $result;
}
@ -273,7 +293,7 @@ class Studentview_model extends CI_Model
* get student application details
* created by kms*/
public function getStudentApplicationDetails($studentID=null,$courseID=null){
$this->db->select('AS.CourseID,AS.CertificationType,AS.AppDate,AS.Comments,CF.Sem_Year,PLD.ListName');
$this->db->select('AS.CourseID,AS.AppDate,AS.Comments,CF.Sem_Year,PLD.ListName');
$this->db->from(APPLICATION_STATUS.' as AS');
$this->db->join(COURSE_FEES.' as CF','CF.ID = AS.CourseID');
$this->db->join(COURSE.' as CU', 'CU.CourseID = CF.CourseID');