course details changes done
This commit is contained in:
parent
179a73b7fd
commit
39620d49a2
@ -18,7 +18,7 @@ class Studentview_model extends CI_Model
|
|||||||
// get student list based on login user
|
// get student list based on login user
|
||||||
public function getStudentInfo($requestedBy=null,$requestFrom=null)
|
public function getStudentInfo($requestedBy=null,$requestFrom=null)
|
||||||
{
|
{
|
||||||
if($requestFrom !='1'){
|
if($requestFrom =='2'){
|
||||||
$this->db->select('ST.*');
|
$this->db->select('ST.*');
|
||||||
$this->db->from( LOGIN . ' as LO');
|
$this->db->from( LOGIN . ' as LO');
|
||||||
$this->db->join( STUDENTS . ' as ST', 'LO.StaffID = ST.StudentID');
|
$this->db->join( STUDENTS . ' as ST', 'LO.StaffID = ST.StudentID');
|
||||||
@ -35,7 +35,7 @@ class Studentview_model extends CI_Model
|
|||||||
$result['studentInfo'] = "";
|
$result['studentInfo'] = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else if($requestFrom =='1'){
|
||||||
$this->db->select('ST.*');
|
$this->db->select('ST.*');
|
||||||
$this->db->from( LOGIN . ' as LO');
|
$this->db->from( LOGIN . ' as LO');
|
||||||
$this->db->join( STUDENTS . ' as ST', 'LO.StaffID = ST.StudentID');
|
$this->db->join( STUDENTS . ' as ST', 'LO.StaffID = ST.StudentID');
|
||||||
@ -52,6 +52,23 @@ class Studentview_model extends CI_Model
|
|||||||
$result['studentInfo'] = "";
|
$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;
|
return $result;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user