function _DatabaseHandler::get_student_settings

4.x _DatabaseHandler.php _DatabaseHandler::get_student_settings($student_cwid)
5.x _DatabaseHandler.php _DatabaseHandler::get_student_settings($student_cwid)

File

classes/_DatabaseHandler.php, line 928

Class

_DatabaseHandler

Code

function get_student_settings($student_cwid) 
 {
  // This returns an array (from the xml) of a student's
  // settings in the student_settings table.  It will
  // return FALSE if the student was not in the table.

  $res = $this->db_query("SELECT * FROM student_settings
							WHERE student_id = '?' ", $student_cwid);
  if ($this->db_num_rows($res) < 1) 
   {
    return false;
  }

  $cur = $this->db_fetch_array($res);

  if (!$rtn = unserialize($cur ["settings"])) {
    $rtn = array();
  }

  return $rtn;

}