function schools_get_school_definitions

7.x schools.module schools_get_school_definitions($bool_return_db_rows = FALSE)
6.x schools.module schools_get_school_definitions($bool_return_db_rows = FALSE)
17 calls to schools_get_school_definitions()
admin_display_degrees_popup_add_group2 in modules/admin/admin.degrees.inc
admin_display_groups_popup_edit_definition in modules/admin/admin.groups.inc
admin_display_groups_popup_show_group_use in modules/admin/admin.groups.inc
Displays a popup showing where a particular group is being used in FlightPath.
admin_display_main in modules/admin/admin.module
This is the "main" page for the admin module. It's what the user first sees when the click to go to the Admin page.
admin_edit_degree_form_validate in modules/admin/admin.degrees.inc

... See full list

File

modules/schools/schools.module, line 1492
Schools module.

Code

function schools_get_school_definitions($bool_return_db_rows = FALSE) {
  $rtn = array();

  $rtn [0] = t("Default");

  if ($bool_return_db_rows) {
    $rtn [0] = array(
      'school_id' => 0,
      'school_code' => '',
      'name' => t('Default'),
    );
  }

  $res = db_query("SELECT * FROM schools ORDER BY school_id");
  while ($cur = db_fetch_array($res)) {
    $key = intval($cur ["school_id"]);
    $value = $cur ["name"];

    $rtn [$key] = $value;
    if ($bool_return_db_rows) {
      $rtn [$key] = $cur;
    }

  }


  return $rtn;
}