function calendar_appointment_settings_form

7.x calendar.module calendar_appointment_settings_form($school_id = 0)
6.x calendar.module calendar_appointment_settings_form($school_id = 0)

Lets an admin user configure global settings regarding appointments in FlightPath

3 string references to 'calendar_appointment_settings_form'
calendar_menu in modules/calendar/calendar.module
implements hook_menu
schools_form_alter in modules/schools/schools.module
Implements hook_form_alter
schools_menu in modules/schools/schools.module
Implements hook_menu

File

modules/calendar/calendar.module, line 137

Code

function calendar_appointment_settings_form($school_id = 0) {
  $form = array();

  // Similar to other forms, this one must be separated out by school.  See the course search settings.
  $school_id = intval($school_id);

  $fs = ""; // The field name suffix.  We will add this to the end of all of our field names.  If this is the default school, leave blank.
  if (module_enabled("schools")) {
    $school_name = schools_get_school_name_for_id($school_id);
    fp_set_title(t("Configure %school Appointment settings", array('%school' => $school_name)));
    if ($school_id !== 0) {
      $fs = "~~school_" . $school_id;
    }
  }

  $form ['school_id'] = array(
    'type' => 'hidden',
    'value' => $school_id,
  );


  $options = fp_get_departments();
  $form ['appointments_from_departments' . $fs] = array(
    'type' => 'checkboxes',
    'label' => t("Select departments which allow any of their employees to appear on the student Schedule Appointment screen (for every student):"),
    'options' => $options,
    'value' => variable_get_for_school('appointments_from_departments', array(), $school_id, TRUE),
  );


  return $form;
}