function advise_init
Search API
7.x advise.module | advise_init() |
6.x advise.module | advise_init() |
4.x advise.module | advise_init() |
5.x advise.module | advise_init() |
Implementation of hook_init
File
- modules/
advise/ advise.module, line 1139
Code
function advise_init() {
global $current_student_id, $user, $screen;
$current_student_id = $_REQUEST ["current_student_id"];
// Since this user doesn't have permission to view any sessions,
// he can only view his own.
if (!user_has_permission("view_any_advising_session")) {
$current_student_id = $user->cwid;
$_REQUEST ["current_student_id"] = $current_student_id;
$_REQUEST ["advising_load_active"] = "yes";
}
// Is draft mode enabled?
if ($_SESSION ["fp_draft_mode"] == "yes") {
fp_add_message("<b>" . t("Draft mode") . "</b> " . t("is currently enabled, however, substitutions and advisings will
still be saved normally."), "status", TRUE);
}
}