function advise_display_popup_substitute_selected
Search API
7.x advise.module | advise_display_popup_substitute_selected() |
6.x advise.module | advise_display_popup_substitute_selected() |
4.x advise.module | advise_display_popup_substitute_selected() |
5.x advise.module | advise_display_popup_substitute_selected() |
File
- modules/
advise/ advise.module, line 1301
Code
function advise_display_popup_substitute_selected() {
global $current_student_id, $fp, $screen;
$rtn = "";
$school_id = db_get_school_id_for_student_id($current_student_id);
advise_init_screen();
fp_add_js(fp_get_module_path("advise") . "/js/advise.js");
$sub_decimals_allowed = variable_get_for_school("sub_hours_decimals_allowed", 2, $school_id);
// Add our allowed substitution decimals as a js setting for later use.
fp_add_js(array("subDecimalsAllowed" => $sub_decimals_allowed), "setting");
$course_id = trim(@$_GET ["course_id"]);
$group_id = trim(addslashes(@$_GET ["group_id"]));
$semester_num = trim(addslashes(@$_GET ["semester_num"]));
$req_by_degree_id = trim(addslashes(@$_GET ["req_by_degree_id"]));
$hours_avail = trim(addslashes(@$_GET ["group_hours_remaining"]));
if (@$_GET ["hours_avail"] * 1 > 0) {
$hours_avail = $_GET ["hours_avail"] * 1;
}
$rtn .= "<div class='tenpt'><a href='javascript:history.go(-1);' class='nounderline'>« " . t("return to course selection") . "</a></div>";
$rtn .= $screen->display_popup_substitute($course_id, $group_id, $semester_num, $hours_avail, $req_by_degree_id);
watchdog("advise", "display_popup_substitute_selected $current_student_id", array(), WATCHDOG_DEBUG);
return $rtn;
}