/** * Initialize the subnavigation of this item. This method * is called once before the first item is added or removed. */ public function initSubNavigation() { global $user, $perm; parent::initSubNavigation(); $sem_create_perm = in_array(get_config('SEM_CREATE_PERM'), array('root', 'admin', 'dozent')) ? get_config('SEM_CREATE_PERM') : 'dozent'; // my courses if (is_object($user) && $user->id != 'nobody') { if ($perm->have_perm('admin')) { $navigation = new Navigation(_('Administration')); } else { $navigation = new Navigation(_('Meine Veranstaltungen')); } $navigation->addSubNavigation('list', new Navigation($perm->have_perm('admin') ? _('Veranstaltungsadministration') : _('Aktuelle Veranstaltungen'), 'dispatch.php/my_courses')); if ($perm->have_perm('admin')) { if ($GLOBALS['user']->cfg->MY_INSTITUTES_DEFAULT != 'all') { $navigation->addSubNavigation('schedule', new Navigation(_('Veranstaltungs-Stundenplan'), 'dispatch.php/calendar/instschedule?cid=' . $GLOBALS['user']->cfg->MY_INSTITUTES_DEFAULT)); } } else { $navigation->addSubNavigation('archive', new Navigation(_('Archivierte Veranstaltungen'), 'dispatch.php/my_courses/archive')); } $this->addSubNavigation('my_courses', $navigation); if (Config::get()->MY_COURSES_ENABLE_STUDYGROUPS && !$GLOBALS['perm']->have_perm('admin')) { $navigation = new Navigation(_('Meine Studiengruppen'), 'dispatch.php/my_studygroups'); $navigation->addSubNavigation('index', new Navigation(_('Meine Studiengruppen'), 'dispatch.php/my_studygroups')); $navigation->addSubNavigation('all', new Navigation(_('Studiengruppensuche'), 'dispatch.php/studygroup/browse')); $navigation->addSubNavigation('new', new Navigation(_('Neue Studiengruppe anlegen'), 'dispatch.php/course/wizard?studygroup=1')); $this->addSubNavigation('my_studygroups', $navigation); } if (!$perm->have_perm('admin')) { $navigation = new Navigation(_('Meine Einrichtungen'), 'dispatch.php/my_institutes'); $this->addSubNavigation('my_institutes', $navigation); } } }
/** * Initialize the subnavigation of this item. This method * is called once before the first item is added or removed. */ public function initSubNavigation() { parent::initSubNavigation(); // browse courses $navigation = new Navigation(_('Veranstaltungen'), 'dispatch.php/search/courses'); $navigation->addSubNavigation('all', new Navigation(_('Alle'), 'dispatch.php/search/courses?reset_all=TRUE', array('view' => 'all'))); foreach ($GLOBALS['SEM_CLASS'] as $key => $val) { $navigation->addSubNavigation($key, new Navigation($val['name'], 'dispatch.php/search/courses?reset_all=TRUE&cmd=qs', array('view' => $key))); } $this->addSubNavigation('courses', $navigation); // search archive $navigation = new Navigation(_('Archiv'), 'archiv.php'); $this->addSubNavigation('archive', $navigation); // search users $navigation = new Navigation(_('Personen'), 'browse.php'); $this->addSubNavigation('users', $navigation); // browse institutes $navigation = new Navigation(_('Einrichtungen'), 'institut_browse.php'); $this->addSubNavigation('institutes', $navigation); // browse resources if (get_config('RESOURCES_ENABLE')) { $navigation = new Navigation(_('Ressourcen'), 'resources.php', array('view' => 'search', 'reset' => 'TRUE')); $this->addSubNavigation('resources', $navigation); } }
/** * Initialize the subnavigation of this item. This method * is called once before the first item is added or removed. */ public function initSubNavigation() { parent::initSubNavigation(); $navigation = new Navigation(_('Login'), 'index.php?again=yes'); $navigation->setDescription(_('für registrierte NutzerInnen')); $this->addSubNavigation('login', $navigation); if (in_array('CAS', $GLOBALS['STUDIP_AUTH_PLUGIN'])) { $navigation = new Navigation(_('Login'), 'index.php?again=yes&sso=cas'); $navigation->setDescription(_('für Single Sign On mit CAS')); $this->addSubNavigation('login_cas', $navigation); } if (in_array('Shib', $GLOBALS['STUDIP_AUTH_PLUGIN'])) { $navigation = new Navigation(_('Shibboleth Login'), 'index.php?again=yes&sso=shib'); $navigation->setDescription(_('für Single Sign On mit Shibboleth')); $this->addSubNavigation('login_shib', $navigation); } if (get_config('ENABLE_SELF_REGISTRATION')) { $navigation = new Navigation(_('Registrieren'), 'register1.php'); $navigation->setDescription(_('um NutzerIn zu werden')); $this->addSubNavigation('register', $navigation); } if (Config::get()->ENABLE_FREE_ACCESS) { $navigation = new Navigation(_('Freier Zugang'), 'dispatch.php/public_courses'); $navigation->setDescription(_('ohne Registrierung')); $this->addSubNavigation('browse', $navigation); } $navigation = new Navigation(_('Hilfe'), format_help_url('Basis.Allgemeines')); $navigation->setDescription(_('zu Bedienung und Funktionsumfang')); $this->addSubNavigation('help', $navigation); }
/** * Initialize the subnavigation of this item. This method * is called once before the first item is added or removed. */ public function initSubNavigation() { global $perm; parent::initSubNavigation(); // online list $navigation = new Navigation(_('Wer ist online?'), 'dispatch.php/online'); $this->addSubNavigation('online', $navigation); // contacts $navigation = new Navigation(_('Kontakte'), 'dispatch.php/contact'); $this->addSubNavigation('contacts', $navigation); // study groups if (get_config('STUDYGROUPS_ENABLE')) { $navigation = new Navigation(_('Studiengruppen')); $navigation->addSubNavigation('browse', new Navigation(_('Studiengruppensuche'), 'dispatch.php/studygroup/browse')); $navigation->addSubNavigation('new', new Navigation(_('Neue Studiengruppe anlegen'), 'dispatch.php/course/wizard?studygroup=1')); if (Config::get()->MY_COURSES_ENABLE_STUDYGROUPS) { $navigation->addSubNavigation('index', new Navigation(_('Meine Studiengruppen'), 'dispatch.php/my_studygroups')); } $this->addSubNavigation('studygroups', $navigation); } // ranking if (get_config('SCORE_ENABLE')) { $navigation = new Navigation(_('Rangliste'), 'dispatch.php/score'); $this->addSubNavigation('score', $navigation); } }
/** * Initialize the subnavigation of this item. This method * is called once before the first item is added or removed. */ public function initSubNavigation() { parent::initSubNavigation(); $messages = new Navigation(_('Nachrichten'), 'dispatch.php/messages/overview'); $inbox = new Navigation(_('Eingang'), 'dispatch.php/messages/overview'); $messages->addSubNavigation('inbox', $inbox); $messages->addSubNavigation('sent', new Navigation(_('Gesendet'), 'dispatch.php/messages/sent')); $this->addSubNavigation('messages', $messages); }
public function initSubNavigation() { global $perm, $user; parent::initSubNavigation(); // sitemap if (is_object($user) && $user->id != 'nobody') { $this->addSubNavigation('sitemap', new Navigation(_('Sitemap'), 'dispatch.php/sitemap/')); } //studip $this->addSubNavigation('studip', new Navigation(_('Stud.IP'), 'http://www.studip.de/')); //blog $this->addSubNavigation('blog', new Navigation(_('Blog'), 'http://blog.studip.de/')); // imprint $this->addSubNavigation('siteinfo', new Navigation(_('Impressum'), 'dispatch.php/siteinfo/show?cancel_login=1')); }
/** * Initialize the subnavigation of this item. This method * is called once before the first item is added or removed. */ public function initSubNavigation() { global $auth, $perm; parent::initSubNavigation(); $username = $auth->auth['uname']; // news $navigation = new Navigation(_('Ankündigungen'), 'dispatch.php/news/admin_news'); $this->addSubNavigation('news', $navigation); // votes and tests, evaluations if (get_config('VOTE_ENABLE')) { $navigation = new Navigation(_('Fragebögen'), URLHelper::getURL("dispatch.php/questionnaire/overview")); $this->addSubNavigation('questionnaire', $navigation); $navigation = new Navigation(_('Evaluationen'), 'admin_evaluation.php', array('rangeID' => $username)); $this->addSubNavigation('evaluation', $navigation); } // literature if (get_config('LITERATURE_ENABLE')) { if ($perm->have_perm('admin')) { $navigation = new Navigation(_('Literaturübersicht'), 'admin_literatur_overview.php'); $this->addSubNavigation('literature', $navigation); $navigation->addSubNavigation('overview', new Navigation(_('Literaturübersicht'), 'admin_literatur_overview.php')); $navigation->addSubNavigation('edit_list', new Navigation(_('Literatur bearbeiten'), 'dispatch.php/literature/edit_list?_range_id=self')); $navigation->addSubNavigation('search', new Navigation(_('Literatur suchen'), 'dispatch.php/literature/search?return_range=self')); } elseif (get_config('LITERATURE_ENABLE')) { $navigation = new Navigation(_('Literatur'), 'dispatch.php/literature/edit_list.php', array('_range_id' => 'self')); $this->addSubNavigation('literature', $navigation); $navigation->addSubNavigation('edit_list', new Navigation(_('Literatur bearbeiten'), 'dispatch.php/literature/edit_list?_range_id=self')); $navigation->addSubNavigation('search', new Navigation(_('Literatur suchen'), 'dispatch.php/literature/search?return_range=self')); } } // elearning if (get_config('ELEARNING_INTERFACE_ENABLE')) { $navigation = new Navigation(_('Lernmodule'), 'dispatch.php/elearning/my_accounts'); $this->addSubNavigation('my_elearning', $navigation); } // export if (get_config('EXPORT_ENABLE') && $perm->have_perm('tutor')) { $navigation = new Navigation(_('Export'), 'export.php'); $this->addSubNavigation('export', $navigation); } if ($perm->have_perm('admin') || $perm->have_perm('dozent') && get_config('ALLOW_DOZENT_COURSESET_ADMIN')) { $navigation = new Navigation(_('Anmeldesets'), 'dispatch.php/admission/courseset/index'); $this->addSubNavigation('coursesets', $navigation); $navigation->addSubNavigation('sets', new Navigation(_('Anmeldesets verwalten'), 'dispatch.php/admission/courseset/index')); $navigation->addSubNavigation('userlists', new Navigation(_('Personenlisten'), 'dispatch.php/admission/userlist/index')); $navigation->addSubNavigation('restricted_courses', new Navigation(_('teilnahmebeschränkte Veranstaltungen'), 'dispatch.php/admission/restricted_courses')); } }
/** * Initialize the subnavigation of this item. This method * is called once before the first item is added or removed. */ public function initSubNavigation() { global $perm, $atime; parent::initSubNavigation(); // schedule if (!$perm->have_perm('admin') && get_config('SCHEDULE_ENABLE')) { $navigation = new Navigation(_('Stundenplan'), 'dispatch.php/calendar/schedule'); $this->addSubNavigation('schedule', $navigation); } // calendar $atime = $atime ? intval($atime) : Request::int($atime); if (get_config('CALENDAR_ENABLE')) { $navigation = new Navigation(_('Terminkalender'), 'dispatch.php/calendar/single', array('self' => 1)); $this->addSubNavigation('calendar', $navigation); } }
/** * Initialize the subnavigation of this item. This method * is called once before the first item is added or removed. */ public function initSubNavigation() { global $user, $perm; parent::initSubNavigation(); $username = Request::username('username', $user->username); $current_user = $username == $user->username ? $user : User::findByUsername($username); // profile $navigation = new Navigation(_('Profil'), 'dispatch.php/profile/index'); $this->addSubNavigation('index', $navigation); if ($perm->have_profile_perm('user', $current_user->user_id)) { // avatar $navigation = new Navigation(_('Bild'), 'dispatch.php/settings/avatar'); $this->addSubNavigation('avatar', $navigation); // profile data $navigation = new Navigation(_('Nutzerdaten')); $navigation->addSubNavigation('profile', new Navigation(_('Grunddaten'), 'dispatch.php/settings/account')); if (($perm->get_profile_perm($current_user->user_id) == 'user' || $perm->have_perm('root') && Config::get()->ALLOW_ADMIN_USERACCESS) && !StudipAuthAbstract::CheckField('auth_user_md5.password', $current_user->auth_plugin) && !LockRules::check($current_user->user_id, 'password')) { $navigation->addSubNavigation('password', new Navigation(_('Passwort ändern'), 'dispatch.php/settings/password')); } $navigation->addSubNavigation('details', new Navigation(_('Weitere Daten'), 'dispatch.php/settings/details')); if (!in_array($current_user->perms, words('user admin root'))) { $navigation->addSubNavigation('studies', new Navigation(_('Studiendaten'), 'dispatch.php/settings/studies')); } if ($current_user->perms != 'root') { if (count(UserDomain::getUserDomains())) { $navigation->addSubNavigation('userdomains', new Navigation(_('Nutzerdomänen'), 'dispatch.php/settings/userdomains')); } if ($perm->is_staff_member($current_user->user_id)) { $navigation->addSubNavigation('statusgruppen', new Navigation(_('Einrichtungsdaten'), 'dispatch.php/settings/statusgruppen')); } } $this->addSubNavigation('edit', $navigation); if ($perm->have_perm('autor')) { $navigation = new Navigation(_('Einstellungen')); $navigation->addSubNavigation('general', new Navigation(_('Allgemeines'), 'dispatch.php/settings/general')); $navigation->addSubNavigation('privacy', new Navigation(_('Privatsphäre'), 'dispatch.php/settings/privacy')); $navigation->addSubNavigation('messaging', new Navigation(_('Nachrichten'), 'dispatch.php/settings/messaging')); if (get_config('CALENDAR_ENABLE')) { $navigation->addSubNavigation('calendar_new', new Navigation(_('Terminkalender'), 'dispatch.php/settings/calendar')); } if (!$perm->have_perm('admin') and get_config('MAIL_NOTIFICATION_ENABLE')) { $navigation->addSubNavigation('notification', new Navigation(_('Benachrichtigung'), 'dispatch.php/settings/notification')); } if (isDefaultDeputyActivated() && $perm->get_perm() == 'dozent') { $navigation->addSubNavigation('deputies', new Navigation(_('Standardvertretung'), 'dispatch.php/settings/deputies')); } if (Config::Get()->API_ENABLED) { $navigation->addSubNavigation('api', new Navigation(_('API-Berechtigungen'), 'dispatch.php/api/authorizations')); } $this->addSubNavigation('settings', $navigation); } // user defined sections $navigation = new Navigation(_('Kategorien'), 'dispatch.php/settings/categories'); $this->addSubNavigation('categories', $navigation); } // user documents page if (Config::get()->PERSONALDOCUMENT_ENABLE && ($perm->have_profile_perm('user', $current_user->user_id) || Config::get()->PERSONALDOCUMENT_OPEN_ACCESS)) { $title = _('Meine Dateien'); if (Config::get()->PERSONALDOCUMENT_OPEN_ACCESS && $current_user->id !== $user->id) { $title = _('Dateibereich'); } $navigation = new Navigation($title, 'dispatch.php/document/files'); $this->addSubNavigation('files', $navigation); } }
/** * Initialize the subnavigation of this item. This method * is called once before the first item is added or removed. */ public function initSubNavigation() { global $perm, $auth; $username = $auth->auth['uname']; parent::initSubNavigation(); if (!$perm->have_perm('user')) { return; } $sem_create_perm = in_array(get_config('SEM_CREATE_PERM'), array('root', 'admin', 'dozent')) ? get_config('SEM_CREATE_PERM') : 'dozent'; // my courses if ($perm->have_perm('root')) { $navigation = new Navigation(_('Veranstaltungsübersicht'), 'dispatch.php/search/courses'); } else { if ($perm->have_perm('admin')) { $navigation = new Navigation(_('Veranstaltungen an meinen Einrichtungen'), 'dispatch.php/my_courses'); } else { $navigation = new Navigation(_('Meine Veranstaltungen'), 'dispatch.php/my_courses'); if (!$perm->have_perm('dozent')) { $navigation->addSubNavigation('browse', new Navigation(_('Veranstaltung hinzufügen'), 'dispatch.php/search/courses')); if ($perm->have_perm('autor') && get_config('STUDYGROUPS_ENABLE')) { $navigation->addSubNavigation('new_studygroup', new Navigation(_('Studiengruppe anlegen'), 'dispatch.php/course/wizard?studygroup=1')); } } else { if ($perm->have_perm($sem_create_perm)) { $navigation->addSubNavigation('new_course', new Navigation(_('Neue Veranstaltung anlegen'), 'dispatch.php/course/wizard')); } if (get_config('STUDYGROUPS_ENABLE')) { $navigation->addSubNavigation('new_studygroup', new Navigation(_('Studiengruppe anlegen'), 'dispatch.php/course/wizard?studygroup=1')); } } } } $this->addSubNavigation('my_courses', $navigation); // course administration if ($perm->have_perm('admin')) { $navigation = new Navigation(_('Verwaltung von Veranstaltungen'), 'dispatch.php/my_courses'); if ($perm->have_perm($sem_create_perm)) { $navigation->addSubNavigation('new_course', new Navigation(_('Neue Veranstaltung anlegen'), 'dispatch.php/course/wizard')); } if (get_config('STUDYGROUPS_ENABLE')) { $navigation->addSubNavigation('new_studygroup', new Navigation(_('Studiengruppe anlegen'), 'dispatch.php/course/wizard?studygroup=1')); } $this->addSubNavigation('admin_course', $navigation); } // insitute administration if ($perm->have_perm('admin')) { $navigation = new Navigation(_('Verwaltung von Einrichtungen'), 'dispatch.php/institute/basicdata/index?list=TRUE'); $this->addSubNavigation('admin_inst', $navigation); } // user administration if ($perm->have_perm('root')) { $navigation = new Navigation(_('Verwaltung globaler Einstellungen'), 'admin_range_tree.php'); $this->addSubNavigation('admin_user', $navigation); } else { if ($perm->have_perm('admin') && !get_config('RESTRICTED_USER_MANAGEMENT')) { $navigation = new Navigation(_('Globale Benutzerverwaltung'), 'dispatch.php/admin/user/'); $this->addSubNavigation('admin_user', $navigation); } } // plugin and role administration if ($perm->have_perm('root')) { $navigation = new Navigation(_('Verwaltung von Plugins'), 'dispatch.php/admin/plugin'); $navigation->addSubNavigation('admin_roles', new Navigation(_('Verwaltung von Rollen'), 'dispatch.php/admin/role')); $this->addSubNavigation('admin_plugins', $navigation); } // administration of ressources if ($perm->have_perm('admin')) { if (get_config('RESOURCES_ENABLE')) { $navigation = new Navigation(_('Verwaltung von Ressourcen')); $navigation->addSubNavigation('hierarchy', new Navigation(_('Struktur'), 'resources.php#a', array('view' => 'resources'))); if ($perm->have_perm('admin') && get_config('RESOURCES_ALLOW_ROOM_REQUESTS')) { if (getGlobalPerms($GLOBALS['user']->id) !== 'admin') { $resList = new ResourcesUserRoomsList($GLOBALS['user']->id, false, false); $show_roomplanning = $resList->roomsExist(); } else { $show_roomplanning = true; } if ($show_roomplanning) { $navigation->addSubNavigation('start_planning', new Navigation(_('Raumplanung'), 'resources.php?cancel_edit_request_x=1', array('view' => 'requests_start'))); } } if (getGlobalPerms($GLOBALS['user']->id) == 'admin') { $navigation->addSubNavigation('edit_types', new Navigation(_('Anpassen'), 'resources.php', array('view' => 'edit_types'))); } $this->addSubNavigation('ressources', $navigation); } } // messaging $navigation = new Navigation(_('Nachrichten')); $navigation->addSubNavigation('in', new Navigation(_('Posteingang'), 'dispatch.php/messages/overview')); $navigation->addSubNavigation('out', new Navigation(_('Gesendet'), 'dispatch.php/messages/sent')); $this->addSubNavigation('messaging', $navigation); // community $navigation = new Navigation(_('Community')); $navigation->addSubNavigation('online', new Navigation(_('Wer ist online?'), 'dispatch.php/online')); $navigation->addSubNavigation('contacts', new Navigation(_('Meine Kontakte'), 'dispatch.php/contact')); // study groups if (get_config('STUDYGROUPS_ENABLE')) { $navigation->addSubNavigation('browse', new Navigation(_('Studiengruppen'), 'dispatch.php/studygroup/browse')); } // ranking if (get_config('SCORE_ENABLE')) { $navigation->addSubNavigation('score', new Navigation(_('Rangliste'), 'dispatch.php/score')); $this->addSubNavigation('community', $navigation); } // calendar / home page if (!$perm->have_perm('admin')) { $navigation = new Navigation(_('Mein Profil'), 'dispatch.php/profile'); if ($perm->have_perm('autor')) { $navigation->addSubNavigation('settings', new Navigation(_('Einstellungen'), 'dispatch.php/settings/general')); } $this->addSubNavigation('profile', $navigation); $navigation = new Navigation(_('Mein Planer')); if (get_config('CALENDAR_ENABLE')) { $navigation->addSubNavigation('calendar', new Navigation(_('Terminkalender'), 'dispatch.php/calendar/single')); } if (get_config('SCHEDULE_ENABLE')) { $navigation->addSubNavigation('schedule', new Navigation(_('Stundenplan'), 'dispatch.php/calendar/schedule')); } $this->addSubNavigation('planner', $navigation); } // global search $navigation = new Navigation(_('Suchen'), 'dispatch.php/search/courses'); $navigation->addSubNavigation('user', new Navigation(_('Personensuche'), 'browse.php')); $navigation->addSubNavigation('course', new Navigation(_('Veranstaltungssuche'), 'dispatch.php/search/courses')); $this->addSubNavigation('search', $navigation); // tools $navigation = new Navigation(_('Tools')); $navigation->addSubNavigation('news', new Navigation(_('Ankündigungen'), 'dispatch.php/news/admin_news')); if (get_config('VOTE_ENABLE')) { $navigation->addSubNavigation('vote', new Navigation(_('Umfragen und Tests'), 'admin_vote.php', array('page' => 'overview', 'showrangeID' => $username))); $navigation->addSubNavigation('evaluation', new Navigation(_('Evaluationen'), 'admin_evaluation.php', array('rangeID' => $username))); } // literature if (get_config('LITERATURE_ENABLE')) { $navigation->addSubNavigation('literature', new Navigation(_('Literatur'), 'dispatch.php/literature/edit_list.php', array('_range_id' => 'self'))); } // elearning if (get_config('ELEARNING_INTERFACE_ENABLE')) { $navigation->addSubNavigation('elearning', new Navigation(_('Lernmodule'), 'dispatch.php/elearning/my_accounts')); } // export if (get_config('EXPORT_ENABLE') && $perm->have_perm('tutor')) { $navigation->addSubNavigation('export', new Navigation(_('Export'), 'export.php')); } $this->addSubNavigation('tools', $navigation); // external help $navigation = new Navigation(_('Hilfe'), format_help_url('Basis.Allgemeines')); $navigation->addSubNavigation('intro', new Navigation(_('Schnelleinstieg'), format_help_url('Basis.SchnellEinstiegKomplett'))); $this->addSubNavigation('help', $navigation); }
/** * Initialize the subnavigation of this item. This method * is called once before the first item is added or removed. */ public function initSubNavigation() { global $perm, $user; parent::initSubNavigation(); // top navigation (toolbar) $this->addSubNavigation('start', new StartNavigation()); // if the user is not logged in, he will see the free courses, otherwise // the my courses page will be shown. if (is_object($user) && $user->id != 'nobody' || get_config('ENABLE_FREE_ACCESS')) { $this->addSubNavigation('browse', new BrowseNavigation()); } // if a course is selected, the navigation for it will be loaded, but // it will not be shown in the main toolbar if ($_SESSION['SessionSeminar']) { $this->addSubNavigation('course', new CourseNavigation()); } if (is_object($user) && $user->id != 'nobody') { // internal message system $this->addSubNavigation('messaging', new MessagingNavigation()); // community page $this->addSubNavigation('community', new CommunityNavigation()); // user profile page $this->addSubNavigation('profile', new ProfileNavigation()); // calendar and schedule page $this->addSubNavigation('calendar', new CalendarNavigation()); // search page $this->addSubNavigation('search', new SearchNavigation()); } // tools page if (is_object($user) && $perm->have_perm('autor')) { $this->addSubNavigation('tools', new ToolsNavigation()); } // admin page if (is_object($user) && $perm->have_perm('admin')) { $this->addSubNavigation('admin', new AdminNavigation()); } // resource managment, if it is enabled if (get_config('RESOURCES_ENABLE')) { //TODO: suboptimal, es sollte eine ResourcesNavigation geben $navigation = new Navigation(_('Ressourcen'), 'resources.php', array('view' => 'resources')); if (is_object($user) && $perm->have_perm('admin')) { $navigation->setImage(Icon::create('resources', 'navigation', ["title" => _('Zur Ressourcenverwaltung')])); } $this->addSubNavigation('resources', $navigation); } // quick links $links = new Navigation('Links'); // login / logout if (is_object($user) && $user->id != 'nobody') { $links->addSubNavigation('logout', new Navigation(_('Logout'), 'logout.php')); } else { if (in_array('CAS', $GLOBALS['STUDIP_AUTH_PLUGIN'])) { $links->addSubNavigation('login_cas', new Navigation(_('Login CAS'), Request::url(), array('again' => 'yes', 'sso' => 'cas'))); } if (in_array('Shib', $GLOBALS['STUDIP_AUTH_PLUGIN'])) { $links->addSubNavigation('login_shib', new Navigation(_('Login Shibboleth'), Request::url(), array('again' => 'yes', 'sso' => 'shib'))); } $links->addSubNavigation('login', new Navigation(_('Login'), Request::url(), array('again' => 'yes'))); } $this->addSubNavigation('links', $links); // footer links $this->addSubNavigation('footer', new FooterNavigation(_('Footer'))); // login page $this->addSubNavigation('login', new LoginNavigation(_('Login'))); }
/** * Initialize the subnavigation of this item. This method * is called once before the first item is added or removed. */ public function initSubNavigation() { global $SEM_CLASS, $SEM_TYPE; global $SessSemName, $user; parent::initSubNavigation(); // list of used modules $Modules = new Modules(); $modules = $Modules->getLocalModules($SessSemName[1], $SessSemName['class'], false, $SessSemName['art_num']); if ($SessSemName['class'] === 'sem') { $sem_class = $SEM_CLASS[$SEM_TYPE[$SessSemName['art_num']]['class']] ?: SemClass::getDefaultSemClass(); } else { $sem_class = SemClass::getDefaultInstituteClass($SessSemName['art_num']); } // general information if (($modules['overview'] || $sem_class->isSlotMandatory("overview")) && $sem_class->isModuleAllowed($sem_class->getSlotModule("overview"))) { foreach ($sem_class->getNavigationForSlot("overview") as $nav_name => $navigation) { if ($nav_name && is_a($navigation, "Navigation")) { $this->addSubNavigation($nav_name, $navigation); } } } // admin area if (($modules['admin'] || $sem_class->isSlotMandatory("admin")) && $sem_class->isModuleAllowed($sem_class->getSlotModule("admin"))) { foreach ($sem_class->getNavigationForSlot("admin") as $nav_name => $navigation) { if ($nav_name && is_a($navigation, "Navigation")) { $this->addSubNavigation($nav_name, $navigation); } } } // forum if (($modules['forum'] || $sem_class->isSlotMandatory("forum")) && $sem_class->isModuleAllowed($sem_class->getSlotModule("forum"))) { foreach ($sem_class->getNavigationForSlot("forum") as $nav_name => $navigation) { if ($nav_name && is_a($navigation, "Navigation")) { $this->addSubNavigation($nav_name, $navigation); } } } // participants if ($user->id != 'nobody') { if ($modules['personal']) { $navigation = new Navigation(_('Personal')); $navigation->setImage(Icon::create('persons', 'info_alt')); $navigation->setActiveImage(Icon::create('persons', 'info')); $navigation->addSubNavigation('view', new Navigation(_('MitarbeiterInnen'), 'dispatch.php/institute/members')); if ($GLOBALS['perm']->have_studip_perm('tutor', $_SESSION['SessionSeminar']) && $GLOBALS['perm']->have_perm('admin')) { $navigation->addSubNavigation('edit_groups', new Navigation(_('Funktionen / Gruppen verwalten'), 'dispatch.php/admin/statusgroups')); } $this->addSubNavigation('faculty', $navigation); } if (($modules['participants'] || $sem_class->isSlotMandatory("participants")) && $sem_class->isModuleAllowed($sem_class->getSlotModule("participants"))) { foreach ($sem_class->getNavigationForSlot("participants") as $nav_name => $navigation) { if ($nav_name && is_a($navigation, "Navigation")) { $this->addSubNavigation($nav_name, $navigation); } } } } // files if (($modules['documents'] || $sem_class->isSlotMandatory("documents")) && $sem_class->isModuleAllowed($sem_class->getSlotModule("documents"))) { foreach ($sem_class->getNavigationForSlot("documents") as $nav_name => $navigation) { if ($nav_name && is_a($navigation, "Navigation")) { $this->addSubNavigation($nav_name, $navigation); } } } // schedule if (($modules['schedule'] || $sem_class->isSlotMandatory("schedule")) && $sem_class->isModuleAllowed($sem_class->getSlotModule("schedule"))) { foreach ($sem_class->getNavigationForSlot("schedule") as $nav_name => $navigation) { if ($nav_name && is_a($navigation, "Navigation")) { $this->addSubNavigation($nav_name, $navigation); } } } // information page if (($modules['scm'] || $sem_class->isSlotMandatory("scm")) && $sem_class->isModuleAllowed($sem_class->getSlotModule("scm"))) { foreach ($sem_class->getNavigationForSlot("scm") as $nav_name => $navigation) { if ($nav_name && is_a($navigation, "Navigation")) { $this->addSubNavigation($nav_name, $navigation); } } } // literature if (($modules['literature'] || $sem_class->isSlotMandatory("literature")) && $sem_class->isModuleAllowed($sem_class->getSlotModule("literature"))) { foreach ($sem_class->getNavigationForSlot("literature") as $nav_name => $navigation) { if ($nav_name && is_a($navigation, "Navigation")) { $this->addSubNavigation($nav_name, $navigation); } } } // wiki if (($modules['wiki'] || $sem_class->isSlotMandatory("wiki")) && $sem_class->isModuleAllowed($sem_class->getSlotModule("wiki"))) { foreach ($sem_class->getNavigationForSlot("wiki") as $nav_name => $navigation) { if ($nav_name && is_a($navigation, "Navigation")) { $this->addSubNavigation($nav_name, $navigation); } } } // resources if (($modules['resources'] || $sem_class->isSlotMandatory("resources")) && $sem_class->isModuleAllowed($sem_class->getSlotModule("resources"))) { foreach ($sem_class->getNavigationForSlot("resources") as $nav_name => $navigation) { if ($nav_name && is_a($navigation, "Navigation")) { $this->addSubNavigation($nav_name, $navigation); } } } // calendar if (($modules['calendar'] || $sem_class->isSlotMandatory("calendar")) && $sem_class->isModuleAllowed($sem_class->getSlotModule("calendar"))) { foreach ($sem_class->getNavigationForSlot("calendar") as $nav_name => $navigation) { if ($nav_name && is_a($navigation, "Navigation")) { $this->addSubNavigation($nav_name, $navigation); } } } // content modules if (($modules['elearning_interface'] || $sem_class->isSlotMandatory("elearning_interface")) && $sem_class->isModuleAllowed($sem_class->getSlotModule("elearning_interface"))) { foreach ($sem_class->getNavigationForSlot("elearning_interface") as $nav_name => $navigation) { if ($nav_name && is_a($navigation, "Navigation")) { $this->addSubNavigation($nav_name, $navigation); } } } //plugins $standard_plugins = PluginManager::getInstance()->getPlugins("StandardPlugin", $_SESSION['SessionSeminar']); foreach ($standard_plugins as $plugin) { if (!$sem_class->isSlotModule(get_class($plugin))) { foreach ($sem_class->getNavigationForSlot(get_class($plugin)) as $nav_name => $navigation) { if ($nav_name && is_a($navigation, "Navigation")) { $this->addSubNavigation($nav_name, $navigation); } } } } }
/** * Initialize the subnavigation of this item. This method * is called once before the first item is added or removed. */ public function initSubNavigation() { global $SessionSeminar, $SessSemName, $archive_kill, $perm; parent::initSubNavigation(); if ($SessSemName['class'] == 'inst') { if (isset($_SESSION['links_admin_data']['referred_from']) && $_SESSION['links_admin_data']['referred_from'] == 'inst') { $back_jump = _('zurück zur ausgewählten Einrichtung'); } else { $back_jump = _('zur ausgewählten Einrichtung'); } } else { if ($SessSemName['class'] == 'sem') { if (isset($_SESSION['links_admin_data']['referred_from']) && $_SESSION['links_admin_data']['referred_from'] == 'sem' && !$archive_kill && !(isset($_SESSION['links_admin_data']['assi']) && $_SESSION['links_admin_data']['assi'])) { $back_jump = _('zurück zur ausgewählten Veranstaltung'); } else { if (isset($_SESSION['links_admin_data']['referred_from']) && $_SESSION['links_admin_data']['referred_from'] == 'assi' && !$archive_kill) { $back_jump = _('zur neu angelegten Veranstaltung'); } else { if (!(isset($_SESSION['links_admin_data']['assi']) && $_SESSION['links_admin_data']['assi'])) { $back_jump = _('zur ausgewählten Veranstaltung'); } } } } } $sem_create_perm = in_array(Config::get()->SEM_CREATE_PERM, array('root', 'admin', 'dozent')) ? Config::get()->SEM_CREATE_PERM : 'dozent'; // global config / user administration if (!Config::get()->RESTRICTED_USER_MANAGEMENT || $perm->have_perm('root')) { $navigation = new Navigation(_('Benutzer')); $navigation->setURL('dispatch.php/admin/user/'); $navigation->addSubNavigation('index', new Navigation(_('Benutzer'), 'dispatch.php/admin/user')); if ($perm->have_perm('root')) { $navigation->addSubNavigation('user_domains', new Navigation(_('Nutzerdomänen'), 'dispatch.php/admin/domain')); } $this->addSubNavigation('user', $navigation); } // institute administration $navigation = new Navigation(_('Einrichtungen')); $navigation->setURL('dispatch.php/institute/basicdata/index?cid='); $navigation->addSubNavigation('details', new Navigation(_('Grunddaten'), 'dispatch.php/institute/basicdata/index')); $navigation->addSubNavigation('faculty', new Navigation(_('Mitarbeiter'), 'dispatch.php/institute/members?admin_view=1')); $navigation->addSubNavigation('groups', new Navigation(_('Funktionen / Gruppen'), 'dispatch.php/admin/statusgroups?type=inst')); if (Config::get()->VOTE_ENABLE) { $navigation->addSubNavigation('vote', new Navigation(_('Umfragen und Tests'), 'admin_vote.php?view=vote_inst')); $navigation->addSubNavigation('evaluation', new Navigation(_('Evaluationen'), 'admin_evaluation.php?view=eval_inst')); } $navigation->addSubNavigation('modules', new Navigation(_('Inhaltselemente'), 'dispatch.php/course/plus/index')); if (Config::get()->EXTERN_ENABLE) { $navigation->addSubNavigation('external', new Navigation(_('Externe Seiten'), 'admin_extern.php?view=extern_inst')); } if ($perm->have_perm("root") || $perm->is_fak_admin() && Config::get()->INST_FAK_ADMIN_PERMS != 'none') { $navigation->addSubNavigation('create', new Navigation(_('Neue Einrichtung anlegen'), 'dispatch.php/institute/basicdata/index?cid=&i_view=new')); } $this->addSubNavigation('institute', $navigation); $navigation = new Navigation(_('Standort')); if ($perm->have_perm(Config::get()->RANGE_TREE_ADMIN_PERM ? Config::get()->RANGE_TREE_ADMIN_PERM : 'admin')) { $navigation->addSubNavigation('range_tree', new Navigation(_('Einrichtungshierarchie'), 'admin_range_tree.php')); } if ($perm->have_perm(Config::get()->SEM_TREE_ADMIN_PERM ? Config::get()->SEM_TREE_ADMIN_PERM : 'admin') && $perm->is_fak_admin()) { $navigation->addSubNavigation('sem_tree', new Navigation(_('Veranstaltungshierarchie'), 'admin_sem_tree.php')); } if ($perm->have_perm(Config::get()->LOCK_RULE_ADMIN_PERM ? Config::get()->LOCK_RULE_ADMIN_PERM : 'admin')) { $navigation->addSubNavigation('lock_rules', new Navigation(_('Sperrebenen'), 'dispatch.php/admin/lockrules')); } if ($perm->have_perm('root')) { $navigation->addSubNavigation('auto_insert', new Navigation(_('Automatisiertes Eintragen'), 'dispatch.php/admin/autoinsert')); if (Config::get()->SEMESTER_ADMINISTRATION_ENABLE) { $navigation->addSubNavigation('semester', new Navigation(_('Semester'), 'dispatch.php/admin/semester')); $navigation->addSubNavigation('holidays', new Navigation(_('Ferien'), 'dispatch.php/admin/holidays')); } if (Config::get()->EXTERN_ENABLE) { $navigation->addSubNavigation('external', new Navigation(_('Externe Seiten'), 'admin_extern.php?list=TRUE&view=extern_global')); } $navigation->addSubNavigation('studycourse', new Navigation(_('Studiengänge'), 'dispatch.php/admin/studycourse/profession')); $navigation->addSubNavigation('sem_classes', new Navigation(_('Veranstaltungskategorien'), 'dispatch.php/admin/sem_classes/overview')); } $this->addSubNavigation('locations', $navigation); // global config / user administration $navigation = new Navigation(_('System')); if ($perm->have_perm('root')) { $navigation->addSubNavigation('plugins', new Navigation(_('Plugins'), 'dispatch.php/admin/plugin')); $navigation->addSubNavigation('roles', new Navigation(_('Rollen'), 'dispatch.php/admin/role')); $navigation->addSubNavigation('datafields', new Navigation(_('Datenfelder'), 'dispatch.php/admin/datafields')); $navigation->addSubNavigation('configuration', new Navigation(_('Konfiguration'), 'dispatch.php/admin/configuration/configuration')); if (Config::get()->BANNER_ADS_ENABLE) { $navigation->addSubNavigation('banner', new Navigation(_('Werbebanner'), 'dispatch.php/admin/banner')); } $navigation->addSubNavigation('coursewizardsteps', new Navigation(_('Anlegeassistent'), 'dispatch.php/admin/coursewizardsteps')); $navigation->addSubNavigation('studygroup', new Navigation(_('Studiengruppen'), 'dispatch.php/course/studygroup/globalmodules')); if (Config::get()->SMILEYADMIN_ENABLE) { $navigation->addSubNavigation('smileys', new Navigation(_('Smileys'), 'dispatch.php/admin/smileys')); } if (Config::get()->TOURS_ENABLE) { $navigation->addSubNavigation('tour', new Navigation(_('Touren'), 'dispatch.php/tour/admin_overview')); } $navigation->addSubNavigation('help_content', new Navigation(_('Hilfe-Texte'), 'dispatch.php/help_content/admin_overview')); if (Config::get()->ELEARNING_INTERFACE_ENABLE) { $navigation->addSubNavigation('elearning', new Navigation(_('Lernmodule'), 'admin_elearning_interface.php')); } if (Config::get()->WEBSERVICES_ENABLE) { $navigation->addSubNavigation('webservice_access', new Navigation(_('Webservices'), 'dispatch.php/admin/webservice_access')); } if (Config::get()->CRONJOBS_ENABLE) { $navigation->addSubNavigation('cronjobs', new Navigation(_('Cronjobs'), 'dispatch.php/admin/cronjobs/schedules')); } if (Config::get()->PERSONALDOCUMENT_ENABLE) { $navigation->addSubNavigation('document_area', new Navigation(_('Pers. Dateibereich'), 'dispatch.php/document/administration')); } $navigation->addSubNavigation('admissionrules', new Navigation(_('Anmelderegeln'), 'dispatch.php/admission/ruleadministration')); $navigation->addSubNavigation('api', new Navigation(_('API'), 'dispatch.php/admin/api')); } if ($perm->have_perm(Config::get()->AUX_RULE_ADMIN_PERM ? Config::get()->AUX_RULE_ADMIN_PERM : 'admin')) { $navigation->addSubNavigation('specification', new Navigation(_('Zusatzangaben'), 'dispatch.php/admin/specification')); } $this->addSubNavigation('config', $navigation); // log view if ($perm->have_perm('root') && Config::get()->LOG_ENABLE) { $navigation = new Navigation(_('Log')); $navigation->addSubNavigation('show', new Navigation(_('Log'), 'dispatch.php/event_log/show')); $navigation->addSubNavigation('admin', new Navigation(_('Einstellungen'), 'dispatch.php/event_log/admin')); $this->addSubNavigation('log', $navigation); } // link to course if ($SessSemName['class'] == 'inst') { $navigation = new Navigation($back_jump, 'dispatch.php/institute/overview?auswahl=' . $SessSemName[1]); $this->addSubNavigation('back_jump', $navigation); } else { if ($SessSemName['class'] == 'sem' && !$archive_kill && !(isset($_SESSION['links_admin_data']['assi']) && $_SESSION['links_admin_data']['assi'])) { $navigation = new Navigation($back_jump, 'seminar_main.php?auswahl=' . $SessSemName[1]); $this->addSubNavigation('back_jump', $navigation); } } // admin plugins $navigation = new Navigation(_('Admin-Plugins')); $this->addSubNavigation('plugins', $navigation); }