course details changes done

This commit is contained in:
gandhimathi 2018-01-31 10:51:19 +05:30
parent 179a73b7fd
commit 39620d49a2

View File

@ -18,7 +18,7 @@ class Studentview_model extends CI_Model
// get student list based on login user
public function getStudentInfo($requestedBy=null,$requestFrom=null)
{
if($requestFrom !='1'){
if($requestFrom =='2'){
$this->db->select('ST.*');
$this->db->from( LOGIN . ' as LO');
$this->db->join( STUDENTS . ' as ST', 'LO.StaffID = ST.StudentID');
@ -35,7 +35,7 @@ class Studentview_model extends CI_Model
$result['studentInfo'] = "";
}
}
else{
else if($requestFrom =='1'){
$this->db->select('ST.*');
$this->db->from( LOGIN . ' as LO');
$this->db->join( STUDENTS . ' as ST', 'LO.StaffID = ST.StudentID');
@ -52,6 +52,23 @@ class Studentview_model extends CI_Model
$result['studentInfo'] = "";
}
}
else if ($requestFrom =='3'){
$this->db->select('ST.*');
$this->db->from( LOGIN . ' as LO');
$this->db->join( STUDENTS . ' as ST', 'LO.StaffID = ST.StudentID');
$this->db->where('ST.MobileNumber', $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;