function schools_get_school_code_for_id
Search API
7.x schools.module | schools_get_school_code_for_id($school_id) |
6.x schools.module | schools_get_school_code_for_id($school_id) |
6 calls to schools_get_school_code_for_id()
- AdvisingScreen::output_to_browser in classes/
AdvisingScreen.php - This method outputs the screen to the browser by performing an include(path-to-theme-file.php). All necessary information must be placed into certain variables before the include happens.
- course_search_display_edit_courses in modules/
course_search/ course_search.edit.inc - Display a plain list of courses, making it easier for admins to edit schedules and details in one spot.
- course_search_edit_course_details_form in modules/
course_search/ course_search.edit.inc - This form lets the user edit the course's syllabus or rotation schedule
- fp_get_departments in includes/
misc.inc - Returns an array (suitable for form api) of departments on campus which faculty/staff can be members of.
- stats_report_major_counts in modules/
stats/ stats.module - This report shows how many students are in each major.
File
- modules/
schools/ schools.module, line 1072 - Schools module.
Code
function schools_get_school_code_for_id($school_id) {
if (isset($GLOBALS ["fp_cache_school_code_for_id"][intval($school_id)])) {
return $GLOBALS ["fp_cache_school_code_for_id"][intval($school_id)];
}
$defs = schools_get_school_definitions(TRUE);
$rtn = @$defs [$school_id]['school_code'];
if ($rtn == "") {
$rtn .= t("School ID# ") . $school_id;
}
if (intval($school_id) === 0) {
$rtn = "-";
}
$GLOBALS ["fp_cache_school_code_for_id"][intval($school_id)] = $rtn;
return $rtn;
}