// the last selected one from the session $course_id = Request::option('cid', $_SESSION['SessionSeminar']); // Select the current course or institute if we got one from 'cid' or session. // This also binds the global $_SESSION['SessionSeminar'] // variable to the URL parameter 'cid' for all generated links. if (isset($course_id)) { selectSem($course_id) || selectInst($course_id); unset($course_id); } if (Request::get("sober") && ($GLOBALS['user']->id === "nobody" || $GLOBALS['perm']->have_perm("root"))) { //deactivate non-core-plugins: URLHelper::bindLinkParam("sober", $sober); PluginManager::$sober = true; } // load the default set of plugins PluginEngine::loadPlugins(); // add navigation item: add modules if ((Navigation::hasItem('/course/admin') || $GLOBALS['perm']->have_perm('admin')) && ($perm->have_studip_perm('tutor', $SessSemName[1]) && $SessSemName['class'] == 'sem') && ($SessSemName['class'] != 'sem' || !$GLOBALS['SEM_CLASS'][$GLOBALS['SEM_TYPE'][$SessSemName['art_num']]['class']]['studygroup_mode'])) { $plus_nav = new Navigation(_('Mehr …'), 'dispatch.php/course/plus/index'); $plus_nav->setDescription(_("Mehr Stud.IP-Funktionen für Ihre Veranstaltung")); Navigation::addItem('/course/modules', $plus_nav); } // add navigation item for profile: add modules if (Navigation::hasItem('/profile/edit')) { $plus_nav = new Navigation(_('Mehr …'), 'dispatch.php/profilemodules/index'); $plus_nav->setDescription(_("Mehr Stud.IP-Funktionen für Ihr Profil")); Navigation::addItem('/profile/modules', $plus_nav); } if ($user_did_login) { NotificationCenter::postNotification('UserDidLogin', $user->id); }
/** * */ function auth_loginform() { if (Request::isXhr()) { if (Request::isDialog()) { header('X-Location: ' . URLHelper::getURL($_SERVER['REQUEST_URI'])); page_close(); die; } throw new AccessDeniedException(); } // first of all init I18N because seminar_open is not called here... global $_language_path; // set up dummy user environment if ($GLOBALS['user']->id !== 'nobody') { $GLOBALS['user'] = new Seminar_User('nobody'); $GLOBALS['perm'] = new Seminar_Perm(); $GLOBALS['auth'] = $this; } if (!$_SESSION['_language']) { $_SESSION['_language'] = get_accepted_languages(); } if (!$_SESSION['_language']) { $_SESSION['_language'] = $GLOBALS['DEFAULT_LANGUAGE']; } // init of output via I18N $_language_path = init_i18n($_SESSION['_language']); include 'config.inc.php'; // load the default set of plugins PluginEngine::loadPlugins(); if (Request::get('loginname') && !$_COOKIE[get_class($GLOBALS['sess'])]) { $login_template = $GLOBALS['template_factory']->open('nocookies'); } else { if (isset($this->need_email_activation)) { $this->unauth(); header('Location: ' . URLHelper::getURL('activate_email.php?cancel_login=1&key=&uid=' . $this->need_email_activation)); page_close(); die; } else { unset($_SESSION['semi_logged_in']); // used by email activation $login_template = $GLOBALS['template_factory']->open('loginform'); $login_template->set_attribute('loginerror', isset($this->auth["uname"]) && $this->error_msg); $login_template->set_attribute('error_msg', $this->error_msg); $login_template->set_attribute('uname', isset($this->auth["uname"]) ? $this->auth["uname"] : Request::username('loginname')); $login_template->set_attribute('self_registration_activated', $GLOBALS['ENABLE_SELF_REGISTRATION']); } } PageLayout::setHelpKeyword('Basis.AnmeldungLogin'); $header_template = $GLOBALS['template_factory']->open('header'); $header_template->current_page = _('Login'); $header_template->link_params = array('cancel_login' => 1); include 'lib/include/html_head.inc.php'; echo $header_template->render(); echo $login_template->render(); include 'lib/include/html_end.inc.php'; page_close(); }