function fp_get_degree_classifications
Search API
7.x misc.inc | 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"
7 calls to fp_get_degree_classifications()
- admin_degrees_list_filter_form in modules/
admin/ admin.degrees.inc - 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 - AdvisingScreen::draw_progress_boxes in classes/
AdvisingScreen.php - This function calls drawPieChart to construct the student's 3 progress pie charts.
File
- includes/
misc.inc, line 1349 - 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;
$rtn ["machine_name_to_level_num"][$machine_name] = 1;
}
}
// 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;
$rtn ["machine_name_to_level_num"][$machine_name] = 2;
}
}
// 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;
$rtn ["machine_name_to_level_num"][$machine_name] = 3;
}
}
return $rtn;
}