function schools_administer_schools_form
Search API
7.x schools.module | schools_administer_schools_form() |
6.x schools.module | schools_administer_schools_form() |
1 string reference to 'schools_administer_schools_form'
- schools_menu in modules/
schools/ schools.module - Implements hook_menu
File
- modules/
schools/ schools.module, line 1254 - Schools module.
Code
function schools_administer_schools_form() {
$form = array();
$form = array();
$m = 0;
fp_add_css(fp_get_module_path("alerts") . "/css/style.css");
fp_add_css(fp_get_module_path("user") . "/css/user.css");
fp_add_js(fp_get_module_path("admin") . "/js/admin.js");
$form ["mark" . $m++] = array(
"type" => "markup",
"value" => t("Schools can be divisions within your institution (ex: School of Nursing, School of Pharmacy, etc), distinct campuses
(ex: Washington Campus, South Campus, etc), or divisions of graduate level (Undergrad, Graduate).
The default school is simply called 'Default' and all users and degree data will be placed under the Default school unless otherwise specified.
<br>If you are unsure what to do, <b>leave this page blank</b>.") . "
<br><br>
<a href='https://getflightpath.com/node/11879' target='_blank'>" . t("For a more thorough explanation of Schools, view this help page (loads in a new window)") . "</a>"
. "<br><br><b>" . t("Schools:") . "</b>
<table class='advisees-alerts' style='margin-left: 10px;' cellpadding=5>
<tr>
<th width='10%'>" . t("Actions") . "</th>
<th width='10%'>" . t("Internal ID") . "</th>
<th width='10%'>" . t("Code") . "</th>
<th>" . t("Name") . "</th>
</tr>",
);
$form ["mark" . $m++] = array(
"type" => "markup",
"value" => "<tr><td>-</td><td>0</td><td>-</td><td>" . t("Default") . "</td></tr>",
);
$res = db_query("SELECT * FROM schools ORDER BY school_id");
while ($cur = db_fetch_array($res)) {
$school_id = $cur ["school_id"];
$code = $cur ["school_code"];
$value = $cur ["name"];
$prompt_link = fp_get_js_prompt_link("Enter a new code (up to 5 chars) and name separated by tilda ~ \\n(ex: ULM ~ University of Louisiana Monroe)\\nto change this school to:", "$code ~ $value", "document.getElementById(\"element-perform_action2\").value=\"edit~_~$school_id~_~\" + response; document.getElementById(\"fp-form-schools_administer_schools_form\").submit(); ", "<i class='fa fa-pencil'></i>");
$confirm_link = fp_get_js_confirm_link(t("Are you sure you wish to delete this school_id?\\nNo data will be deleted, but the record connecting the id $school_id to this school will be removed from the 'schools' database table.\\n\\nProceed?"), "document.getElementById(\"element-perform_action2\").value=\"del~_~$school_id\"; document.getElementById(\"fp-form-schools_administer_schools_form\").submit(); ", "<i class='fa fa-remove'></i>", "action-link-remove");
if ($school_id == 0) {
$prompt_link = $confirm_link = "";
}
$form ["mark" . $m++] = array(
"type" => "markup",
"value" => "<tr>
<td >$prompt_link $confirm_link</td>
<td>$school_id</td>
<td>$code</td>
<td>$value</td>
</tr>",
);
}
$form ["mark" . $m++] = array(
"type" => "markup",
"value" => "</table>
<br><div style='border: 1px solid gold; padding: 10px;'><strong>" . t("Important:") . "</strong> " . t("Even if you are not overriding any settings per school, you must still visit each school's <em>Configure school settings</em>
screen from the Admin Console and press the Submit button. Otherwise, some features in FlightPath may not function correctly.</div>"),
);
$form ["perform_action2"] = array(
"type" => "hidden",
);
$form ["new_school"] = array(
"type" => "textfield",
"label" => t("Add a new school as <i>code ~ name</i>:"),
"description" => t("Enter a unique, 1 to 5 character, code for this school, then the name, separated by a tilda (~).
<br> Ex: ULM ~ University of Louisiana Monroe"),
);
$form ['schools_allow_courses_from_default_school'] = array(
'type' => 'select',
'label' => t("Allow courses (in degrees and groups) from the Default school as well as their assigned school?"),
'options' => array('yes' => t('Yes (default)'), 'no' => t('No')),
'hide_please_select' => TRUE,
'value' => variable_get('schools_allow_courses_from_default_school', 'yes'),
'description' => t("This setting has a <b>very powerful</b> implication.
<br>• If set to 'No', it means that degrees and groups must <b>only</b> use
courses belonging to the same school as them. For example, this is useful if you have multiple institutions within FlightPath,
each with a course named ENGL 101, and you need to be explicit about <em>which</em> ENGL 101 you mean.
<br>• If set to 'Yes', it means that degrees and groups will allow courses from their same school <b>as well as</b> courses
from the Default school. This is good if you keep the majority of your courses under Default, and have <em>no duplicates
across schools</em>. For example, if you have separate schools for 'School of Business' and 'School of Nursing' at the same institution, then
a course like ENGL 101 might be used by degrees in both schools. So, ENGL 101 would be placed in the Default school.
<br>
If you are unsure what to select, choose 'Yes'."),
);
$form ["submit"] = array(
"type" => "submit",
"value" => t("Submit"),
);
return $form;
}