_Student::load_student_data

5.x _Student.php _Student::load_student_data()
4.x _Student.php _Student::load_student_data()

This loads a student's personal data, like name and so forth.

1 call to _Student::load_student_data()

File

classes/_Student.php, line 497

Class

_Student

Code

function load_student_data() {

  $cur = null;
  if (isset($GLOBALS['load_student_data'][$this->student_id])) {
    $cur = $GLOBALS['load_student_data'][$this->student_id];
  }
  else {
    $res = $this->db->db_query("SELECT cumulative_hours, gpa, rank_code, catalog_year FROM students WHERE cwid='?'", $this->student_id);
    $cur = $this->db->db_fetch_array($res);
    $GLOBALS['load_student_data'][$this->student_id] = $cur;
  }
  $this->cumulative_hours = $cur['cumulative_hours'];
  $this->gpa = $cur['gpa'];
  $this->db_rank = $cur['rank_code'];
  $this->catalog_year = $cur['catalog_year'];
  $this->rank = $this->get_rank_description($this->db_rank);
  $this->major_code_array = fp_get_student_majors($this->student_id, FALSE);
  $this->major_code_csv = '';
  foreach ($this->major_code_array as $k => $v) {
    $this->major_code_csv .= $k . ',';
  }
  $this->major_code_csv = rtrim($this->major_code_csv, ',');
  $this->name = $this->db->get_student_name($this->student_id);


  /*
    $this->cumulative_hours = $this->db->get_student_cumulative_hours($this->student_id);	
		$this->gpa = $this->db->get_student_gpa($this->student_id);
    $this->db_rank = $this->db->get_student_rank($this->student_id);
    $this->rank = $this->get_rank_description($this->db_rank);
    $this->major_code_array = fp_get_student_majors($this->student_id, FALSE);
    $this->major_code_csv = fp_get_student_majors($this->student_id, TRUE);
		$this->catalog_year = $this->db->get_student_catalog_year($this->student_id);
		$this->name = $this->db->get_student_name($this->student_id);
    */

}