function audit_settings_form

7.x audit.module audit_settings_form($school_id = 0)
6.x audit.module audit_settings_form($school_id = 0)
1 string reference to 'audit_settings_form'
schools_form_alter in modules/schools/schools.module
Implements hook_form_alter

File

modules/audit/audit.module, line 74
This is the Audit module, which provides functionality relating to degree audits.

Code

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

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


  $form ["audit_approval_types" . $fs] = array(
    "label" => t("Enter approval type definitions, one per line:"),
    "type" => "textarea",
    "rows" => 10,
    "value" => variable_get_for_school("audit_approval_types", "coursework ~ Coursework\nmajor_gpa ~ Major GPA\ngraduation_gpa ~ Graduation GPA", $school_id, TRUE),
    "description" => t("Enter definitions for the approval types, one per line, like so:
                        <br>&nbsp;&nbsp;&nbsp; TYPE ~ Title ~ Description
                      <br>- The TYPE must be unique, and contain ONLY letters, numbers, and underscore (_), and must be no more than 60 characters long.  Ex: coursework  
                      <br>- The Title should be relatively short, but has no character limit.  Ex: Coursework Requirement
                      <br>- The Description can be any length, but contain NO line breaks.  It can, however, contain HTML.
                      <br>
                      <b>You may skip lines between definitions.</b>
                      <br>Example:
                      <br>
                      &nbsp;&nbsp;&nbsp; coursework ~ Coursework ~ The student must complete all coursework.
                      <br>&nbsp;&nbsp;&nbsp; major_gpa ~ Major GPA ~ The student's major GPA should be at least 2.5.                      
                      <br>&nbsp;&nbsp;&nbsp; graduation_gpa ~ Graduation GPA ~ The student's graduation GPA must be at least 2.5."),
  );



  $school_initials = variable_get_for_school("school_initials", "DEMO", $school_id);


  $form ["audit_requirement_types" . $fs] = array(
    "label" => t("Enter requirement types & labels to display on Audit tab, one per line:"),
    "type" => "textarea",
    "rows" => 15,
    "value" => variable_get_for_school("audit_requirement_types", "g ~ General Requirements\nc ~ Core\nm ~ Major\ndegree ~ Degree", $school_id, TRUE),
    "description" => "Enter definitions for the requirement types to display, one per line, like so:
                        <br>&nbsp;&nbsp;&nbsp; type_code ~ Label
                      <br>The type_code is one of the 'requirement types' that a course can be defined as. Ex: m, c, etc. 
                      <br><b>Important:</b> The pseudo-code 'degree' must be defined, and it will display totals for the entire degree.
                      <br><b>Important:</b> To see ONLY local (non-transfer) courses, add _local to the end of the type code.  Ex:  c_local for Core, not fulfilled by transfer credits.
                      <br>
                      For ex:
                      <br>
                      &nbsp;&nbsp;&nbsp;g ~ General Requirements
                      <br>&nbsp;&nbsp;&nbsp;c ~ Core
                      <br>&nbsp;&nbsp;&nbsp;m ~ Major
                      <br>&nbsp;&nbsp;&nbsp;degree ~ Degree
                      <br>&nbsp;&nbsp;&nbsp;c_local ~ Core ($school_initials Courses)
                      <br>&nbsp;&nbsp;&nbsp;degree_local ~ Degree ($school_initials Courses)
                      <br>
                      <b>To insert a BLANK row</b>, for appearances on the Audit tab, 
                         give the entry a unique type_code, and set the label to BLANK (all caps).
                         Ex: 
                         <br> &nbsp;&nbsp;&nbsp;BLANK_1 ~ BLANK
                         <br> &nbsp;&nbsp;&nbsp;BLANK_2 ~ BLANK
                         ",

  );






  return $form;
}