function DegreePlan::load_degree_plan_ancillary

6.x DegreePlan.php DegreePlan::load_degree_plan_ancillary()

Loads the "ancillary" information about our degree plan, including advising weight, track selection config, etc.

File

classes/DegreePlan.php, line 461

Class

DegreePlan

Code

function load_degree_plan_ancillary() {
  $degree_id = $this->degree_id;


  $old_semester = "";
  $table_name1 = "degrees";
  $table_name2 = "degree_requirements";
  if ($this->bool_use_draft) {
    $table_name1 = "draft_$table_name1";
    $table_name2 = "draft_$table_name2";
  }


  // We want to get some of the data for this degree.
  $res = db_query("SELECT * FROM $table_name1 WHERE degree_id = ?", $this->degree_id);
  if ($res) {
    $cur = db_fetch_array($res);

    $this->title = @$cur ["title"];
    $this->major_code = @$cur ["major_code"];
    $this->degree_level = @strtoupper(trim($cur ["degree_level"]));

    if ($this->degree_level == "") {
      $this->degree_level = "UG"; // undergrad by default
    }

    $this->degree_class = @$cur ["degree_class"];
    $this->db_override_degree_hours = @$cur ["override_degree_hours"];
    $this->db_advising_weight = @intval($cur ["advising_weight"]);
    $data_entry_value = @trim($cur ['data_entry_value']);

    $this->db_track_selection_config = @trim($cur ["track_selection_config"]);
    $this->parse_track_selection_config(); // load into the track_selection_config_array as needed.
  }

}