function course_search_settings_form

6.x course_search.module course_search_settings_form($school_id = 0)
4.x course_search.module course_search_settings_form()
5.x course_search.module course_search_settings_form()

The system settins form for course_search settings.

File

modules/course_search/course_search.module, line 184
This module allows users to search for courses, descriptions, and, if supported, rotation schedules and sample syllabi.

Code

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

  $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 Course Search settings", array('%school' => $school_name)));
    if ($school_id !== 0) {
      $fs = "~~school_" . $school_id;
    }
  }

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



  $form ["course_search_avail_term_id_suffix_order" . $fs] = array(
    "type" => "textfield",
    "label" => t("Available Term ID Suffixes & Order"),
    "value" => variable_get_for_school("course_search_avail_term_id_suffix_order", "", $school_id, TRUE),
    "description" => t("Enter the order of term ID suffixes, so that they will display
                in the correct order in the table of available course
                offerings.  Separate by comma.") . "
                <br>
                Ex: 60, 40, 41, 80, 81, mm",
  );


  $form ["course_search_avail_term_headers" . $fs] = array(
    "type" => "textfield",
    "label" => t("Available Term Table Headers"),
    "value" => variable_get_for_school("course_search_avail_term_headers", "", $school_id, TRUE),
    "description" => t("Enter the table headers for the available table, in the same
                order as the suffix order above.") . "
                <br>
                Ex: Spring, May, Summer 1, Summer 2, Fall, Winter",
  );


  // TODO:  I am not sure this is even used anymore.  If not, get rid of it.
  $form ["course_search_avail_term_mobile_headers" . $fs] = array(
    "type" => "textfield",
    "label" => t("Available Term Mobile Table Headers"),
    "value" => variable_get_for_school("course_search_avail_term_mobile_headers", "", $school_id, TRUE),
    "description" => t("Enter the table headers for the available table, in the same
                order as the suffix order above, as it should be displayed on
                a mobile device (with a smaller screen).") . "
                <br>
                Ex: Spr, May, Sum1, Sum2, Fall, Win",
  );






  return $form;
}