fp_get_degree_classification_details

5.x misc.inc fp_get_degree_classification_details($degree_class = "MAJOR", $bool_return_class_code_as_title_if_not_found = TRUE)

Returns back an assoc array for the supplied code. Looks like: $arr["level_num"] = number $arr["title"] = the title

7 calls to fp_get_degree_classification_details()
admin_display_degrees in modules/admin/admin.degrees.inc
advise_display_popup_change_track in modules/advise/advise.module
advise_what_if_selection_form in modules/advise/advise.module
fp_render_currently_advising_box in includes/theme.inc
Draws the CurrentlyAdvisingBox which appears at the top of the screen, containing the student's information like name, major, etc.
student_search_display_majors_search in modules/student_search/student_search.module
Display the majors search sub-tab, where we can select a major and see the students assigned to it.

... See full list

File

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

Code

function fp_get_degree_classification_details($degree_class = "MAJOR", $bool_return_class_code_as_title_if_not_found = TRUE) {
  $rtn = array();

  if ($bool_return_class_code_as_title_if_not_found) {
    // Use the degree_class as title for default, if we can't find it otherwise.
    $rtn["level_num"] = 0;
    $rtn["title"] = $degree_class;
    $rtn["degree_class"] = $degree_class;
  }

  $degree_classifications = fp_get_degree_classifications();
  foreach ($degree_classifications["levels"] as $num => $details) {
    if (isset($details[$degree_class])) {
      $rtn["level_num"] = $num;
      $rtn["title"] = $details[$degree_class];
      $rtn["degree_class"] = $degree_class;
      break;
    }
  }


  return $rtn;
}