function fp_get_degree_classifications

6.x misc.inc fp_get_degree_classifications()
5.x misc.inc fp_get_degree_classifications()

Return back an assoc array of our set degree classifications, separated by "level"

8 calls to fp_get_degree_classifications()
admin_display_degrees in modules/admin/admin.degrees.inc
admin_display_edit_degree in modules/admin/admin.degrees.inc
This screen displays the form which allows the user to actually edit a degree.
admin_edit_degree_form in modules/admin/admin.degrees.inc
Meant to replace the old-fashioned display_edit_degree function...
admin_edit_degree_form_submit in modules/admin/admin.degrees.inc
advise_display_popup_change_track in modules/advise/advise.module

... See full list

File

includes/misc.inc, line 778
This file contains misc functions for FlightPath

Code

function fp_get_degree_classifications() {
  $rtn = array();

  // Level 1
  $temp = explode("\n", variable_get("degree_classifications_level_1", "MAJOR ~ Major"));
  foreach ($temp as $line) {
    $temp2 = explode("~", $line);
    $machine_name = trim($temp2 [0]);
    $title = trim($temp2 [1]);
    if ($machine_name != "") {
      $rtn ["levels"][1][$machine_name] = $title;
      $rtn ["machine_names"][$machine_name] = $title;
    }
  }

  // Level 2
  $temp = explode("\n", variable_get("degree_classifications_level_2", "MINOR ~ Minor"));
  foreach ($temp as $line) {
    $temp2 = explode("~", $line);
    $machine_name = trim($temp2 [0]);
    $title = trim($temp2 [1]);
    if ($machine_name != "") {
      $rtn ["levels"][2][$machine_name] = $title;
      $rtn ["machine_names"][$machine_name] = $title;
    }
  }


  // Level 3
  $temp = explode("\n", variable_get("degree_classifications_level_3", "CONC ~ Concentration"));
  foreach ($temp as $line) {
    $temp2 = explode("~", $line);
    $machine_name = trim($temp2 [0]);
    $title = trim($temp2 [1]);
    if ($machine_name != "") {
      $rtn ["levels"][3][$machine_name] = $title;
      $rtn ["machine_names"][$machine_name] = $title;
    }
  }



  return $rtn;
}