function system_settings_form

7.x system.module system_settings_form()
6.x system.module system_settings_form()
4.x system.module system_settings_form()
5.x system.module system_settings_form()

This is the "system settings" form.

File

modules/system/system.module, line 1026

Code

function system_settings_form() {
  $form = array();

  $form ["mark" . $m++] = array(
    "value" => t("Use this form to alter the various system settings in FlightPath.
                  Before making changes, it is always good policy to first back up your database."),

  );

  $form ["mark" . $m++] = array(
    "value" => "<p><div style='font-size:0.8em;'>" . t("Your site requires a cron job in order to perform routine tasks.  This
                        is accomplished by having your server access the following URL every so often
                        (like once an hour):") . "<br>&nbsp; &nbsp; <i>" . $GLOBALS ["fp_system_settings"]["base_url"] . "/cron.php?t=" . $GLOBALS ["fp_system_settings"]["cron_security_token"] . "</i>
                        <br>" . t("Example linux cron command:") . "&nbsp; <i>wget -O - -q -t 1 http://ABOVE_URL</i></div></p>",
  );


  $form ["maintenance_mode"] = array(
    "label" => t("Set maintenance mode?"),
    "type" => "checkbox",
    "value" => variable_get("maintenance_mode", FALSE),
    "description" => t("If checked, a message will display on every page stating
                        that the system is currently undergoing routine maintenance."),
  );


  $form ["contact_email_address"] = array(
    "type" => "textfield",
    "label" => t("Contact email address:"),
    "value" => variable_get("contact_email_address", ""),
    "description" => t("Enter the email address to mail when a user accesses the
                        Contact FlightPath Production Team popup."),

  );

  $form ["theme"] = array(
    "type" => "textfield",
    "label" => t("Theme location:"),
    "value" => variable_get("theme", "themes/classic"),
    "description" => t("Enter the file location for your theme. Do not put preceeding or trailing slashes.  Ex: themes/classic"),
  );


  $form ["school_initials"] = array(
    "type" => "textfield",
    "size" => 20,
    "label" => t("School initials:"),
    "value" => variable_get("school_initials", "DEMO"),
    "description" => t("Ex: ULM or BPCC"),
  );


  $form ["earliest_catalog_year"] = array(
    "type" => "textfield",
    "size" => 20,
    "label" => t("Earliest catalog year:"),
    "value" => variable_get("earliest_catalog_year", "2006"),
    "description" => t("This is the earliest possible catalog year FlightPath may look 
                up.  Typically, this is the earliest year for which you have 
                data (ie, when FlightPath went online.
                If FlightPath cannot figure out a catalog year to use,
                it will default to this one. Ex: 2006"),
  );


  $form ["graduate_level_course_num"] = array(
    "type" => "textfield",
    "size" => 20,
    "label" => t("Graduate level course num:"),
    "value" => variable_get("graduate_level_course_num", "5000"),
    "description" => t("This is the course num which means 'graduate level', meaning
                anything above it is considered a graduate level course. Ex: 5000"),
  );


  $form ["allowed_student_ranks"] = array(
    "type" => "textfield",
    "label" => t("Allowed student ranks (CSV):"),
    "value" => variable_get("allowed_student_ranks", ""),
    "description" => t("This is a list of which student ranks are allowed into FlightPath.
                It should be separated by commas.
                This also affects which students you may search for on the Advisees
                tab. Ex: FR, SO, JR, SR"),
  );


  $form ["not_allowed_student_message"] = array(
    "type" => "textarea",
    "label" => t("Not allowed student message:"),
    "value" => variable_get("not_allowed_student_message", ""),
    "description" => t("When a student is NOT allowed into FlightPath because of their
                rank, this message will be displayed."),
  );


  $form ["hiding_grades_message"] = array(
    "type" => "textarea",
    "label" => t("Hiding grades message:"),
    "value" => variable_get("hiding_grades_message", ""),
    "description" => t("This message will be displayed when any course on the page
                has its bool_hide_grade set to TRUE.  If you are not using
                this functionality, you can leave this blank."),
  );


  $form ["notify_apply_draft_changes_email_address"] = array(
    "type" => "textfield",
    "label" => t("Notify apply draft changes email address:"),
    "value" => variable_get("notify_apply_draft_changes_email_address", ""),
    "description" => t("Enter 1 or more email addresses (separated by comma) to notify when
                draft changes are applied from the admin console.  
                Leave blank to disable."),
  );

  $form ["notify_mysql_error_email_address"] = array(
    "type" => "textfield",
    "label" => t("Notify MySQL error email address:"),
    "value" => variable_get("notify_mysql_error_email_address", ""),
    "description" => t("Enter 1 or more email addresses (separated by comma) to notify when
                a mysql error occurs.  
                Leave blank to disable."),
  );

  $form ["admin_transfer_passcode"] = array(
    "type" => "textfield",
    "label" => t("Admin Apply Draft password:"),
    "value" => variable_get("admin_transfer_passcode", "changeMe"),
    "description" => t("Enter a password which an admin user must enter
                        in order to apply draft changes to FlightPath.
                        This is an added security measure. Ex: p@ssWord569w"),
  );









  return $form;
}