function DatabaseHandler::get_student_settings

7.x DatabaseHandler.php DatabaseHandler::get_student_settings($student_cwid)
6.x DatabaseHandler.php DatabaseHandler::get_student_settings($student_cwid)

File

classes/DatabaseHandler.php, line 1186

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 settings 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;

}