function DatabaseHandler::get_degree_plan

6.x DatabaseHandler.php DatabaseHandler::get_degree_plan($major_and_track_code, $catalog_year = "", $bool_minimal = false, $school_id = 0)
1 call to DatabaseHandler::get_degree_plan()

File

classes/DatabaseHandler.php, line 1605

Class

DatabaseHandler

Code

function get_degree_plan($major_and_track_code, $catalog_year = "", $bool_minimal = false, $school_id = 0) 
 {
  // Returns a degreePlan object from the supplied information.

  // If catalog_year is blank, use whatever the current catalog year is, loaded from our settings table.
  if ($catalog_year == "") {
    $catalog_year = variable_get_for_school("current_catalog_year", "2006", $school_id);
  }

  $degree_id = $this->get_degree_id(trim($major_and_track_code), $catalog_year, FALSE, $school_id);
  $dp = new DegreePlan($degree_id, null, $bool_minimal);
  if ($dp->major_code == "") 
   {
    $dp->major_code = trim($major_and_track_code);
  }
  return $dp;
}