function admin_get_de_catalog_year

7.x admin.module admin_get_de_catalog_year($bool_set_earliest_if_blank = TRUE, $school_id = 0)
6.x admin.module admin_get_de_catalog_year($bool_set_earliest_if_blank = TRUE, $school_id = 0)
4.x admin.module admin_get_de_catalog_year($bool_set_earliest_if_blank = TRUE)
5.x admin.module admin_get_de_catalog_year($bool_set_earliest_if_blank = TRUE)

Get the "de_catalog_year" from the REQUEST. If it's not there or invalid, pull it from our system settings.

16 calls to admin_get_de_catalog_year()
admin_add_degree_form in modules/admin/admin.degrees.inc
This form lets the user add a degree to the database.
admin_apply_draft_changes_form_submit in modules/admin/admin.module
Handles the actual moving of draft courses into production.
admin_copy_degree_form in modules/admin/admin.degrees.inc
This form lets the user copy a degree and all of it's tracks & concentrations.
admin_display_courses in modules/admin/admin.courses.inc
This function displays all of our courses for us to edit.
admin_display_degrees in modules/admin/admin.degrees.inc

... See full list

File

modules/admin/admin.module, line 1217
The administrative configurations for FlightPath.

Code

function admin_get_de_catalog_year($bool_set_earliest_if_blank = TRUE, $school_id = 0) {
  global $current_student_id;
  $db = get_global_database_handler();
  if ($current_student_id) {
    $school_id = $db->get_school_id_for_student_id($current_student_id);
  }


  $de_catalog_year = @$_REQUEST ["de_catalog_year"];

  if ($bool_set_earliest_if_blank) {
    if (!$de_catalog_year || $de_catalog_year < variable_get_for_school("earliest_catalog_year", 2006, $school_id)) {
      $de_catalog_year = variable_get_for_school("earliest_catalog_year", 2006, $school_id);
    }
  }

  return $de_catalog_year;
}