Пример #1
0
 /**
  * common tasks for all actions
  */
 function before_filter(&$action, &$args)
 {
     global $perm;
     parent::before_filter($action, $args);
     $course_id = $args[0];
     $this->course_id = Request::option('cid', $course_id);
     Navigation::activateItem('/course/admin/admission');
     if (!get_object_type($this->course_id, array('sem')) || SeminarCategories::GetBySeminarId($this->course_id)->studygroup_mode || !$perm->have_studip_perm("tutor", $this->course_id)) {
         throw new Trails_Exception(403);
     }
     $this->course = Course::find($this->course_id);
     $this->user_id = $GLOBALS['user']->id;
     PageLayout::setHelpKeyword("Basis.VeranstaltungenVerwaltenZugangsberechtigungen");
     PageLayout::setTitle($this->course->getFullname() . " - " . _("Verwaltung von Zugangsberechtigungen"));
     $lockrules = words('admission_turnout admission_type admission_endtime admission_binding passwort read_level write_level admission_prelim admission_prelim_txt admission_starttime admission_endtime_sem admission_disable_waitlist user_domain admission_binding admission_studiengang');
     foreach ($lockrules as $rule) {
         $this->is_locked[$rule] = LockRules::Check($this->course_id, $rule) ? 'disabled readonly' : '';
     }
     if (!SeminarCategories::GetByTypeId($this->course->status)->write_access_nobody) {
         $this->is_locked['write_level'] = 'disabled readonly';
     }
     update_admission($this->course->id);
     PageLayout::addSqueezePackage('admission');
     URLHelper::addLinkParam('return_to_dialog', Request::get('return_to_dialog'));
 }
Пример #2
0
 /**
  * common tasks for all actions
  */
 function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     PageLayout::setTitle(_('Teilnahmebeschränkte Veranstaltungen'));
     Navigation::activateItem('/tools/coursesets/restricted_courses');
     PageLayout::addSqueezePackage('tablesorter');
 }
Пример #3
0
 /**
  * common tasks for all actions
  */
 function before_filter(&$action, &$args)
 {
     global $perm;
     parent::before_filter($action, $args);
     if (Request::get('termin_id')) {
         $this->dates[0] = new SingleDate(Request::option('termin_id'));
         $this->course_id = $this->dates[0]->range_id;
     }
     if (Request::get('issue_id')) {
         $this->issue_id = Request::option('issue_id');
         $this->dates = array_values(array_map(function ($data) {
             $d = new SingleDate();
             $d->fillValuesFromArray($data);
             return $d;
         }, IssueDB::getDatesforIssue(Request::option('issue_id'))));
         $this->course_id = $this->dates[0]->range_id;
     }
     if (!get_object_type($this->course_id, array('sem')) || SeminarCategories::GetBySeminarId($this->course_id)->studygroup_mode || !$perm->have_studip_perm("tutor", $this->course_id)) {
         throw new Trails_Exception(400);
     }
     PageLayout::setHelpKeyword("Basis.VeranstaltungenVerwaltenAendernVonZeitenUndTerminen");
     PageLayout::setTitle(Course::findCurrent()->getFullname() . " - " . _("Veranstaltungstermine absagen"));
     $this->set_content_type('text/html;charset=windows-1252');
     if (Request::isXhr()) {
         $this->set_layout(null);
         $this->response->add_header('X-Title', PageLayout::getTitle());
         $request = Request::getInstance();
         foreach ($request as $key => $value) {
             $request[$key] = studip_utf8decode($value);
         }
     }
 }
Пример #4
0
 /**
  * Common code for all actions: set default layout and page title.
  *
  * @param type $action
  * @param type $args
  */
 function before_filter(&$action, &$args)
 {
     $this->validate_args($args, array('option', 'option'));
     parent::before_filter($action, $args);
     // set correct encoding if this is an ajax-call
     if (Request::isAjax()) {
         header('Content-Type: text/html; charset=Windows-1252');
     }
     $this->flash = Trails_Flash::instance();
     // set default layout
     $layout = $GLOBALS['template_factory']->open('layouts/base');
     $this->set_layout($layout);
     // Set help keyword for Stud.IP's user-documentation and page title
     PageLayout::setHelpKeyword('Basis.Forum');
     PageLayout::setTitle($_SESSION['SessSemName']['header_line'] . ' - ' . _('Forum'));
     $this->AVAILABLE_DESIGNS = array('web20', 'studip');
     if ($GLOBALS['CANONICAL_RELATIVE_PATH_STUDIP'] && $GLOBALS['CANONICAL_RELATIVE_PATH_STUDIP'] != '/') {
         $this->picturepath = $GLOBALS['CANONICAL_RELATIVE_PATH_STUDIP'] . '/' . $this->dispatcher->trails_root . '/img';
     } else {
         $this->picturepath = '/' . $this->dispatcher->trails_root . '/img';
     }
     // we want to display the dates in german
     setlocale(LC_TIME, 'de_DE@euro', 'de_DE', 'de', 'ge');
     // the default for displaying timestamps
     $this->time_format_string = "%a %d. %B %Y, %H:%M";
     $this->time_format_string_short = "%d.%m.%Y, %H:%M";
     $this->template_factory = new Flexi_TemplateFactory(dirname(__FILE__) . '/../templates');
     //$this->check_token();
     ForumVisit::setVisit($this->getId());
     if (Request::int('page')) {
         ForumHelpers::setPage(Request::int('page'));
     }
     $this->seminar_id = $this->getId();
 }
Пример #5
0
 /**
  * Sets the page title. Page title always includes the course name.
  *
  * @param mixed $title Title of the page (optional)
  */
 private function set_title($title = '')
 {
     $title_parts = func_get_args();
     $title_parts[] = $GLOBALS['SessSemName']['header_line'];
     $page_title = implode(' - ', $title_parts);
     PageLayout::setTitle($page_title);
 }
Пример #6
0
 function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     // Remove cid
     URLHelper::removeLinkParam('cid');
     unset($_SESSION['SessionSeminar']);
     $this->set_layout($GLOBALS['template_factory']->open('layouts/base_without_infobox'));
     Navigation::activateItem('/profile/index');
     URLHelper::addLinkParam('username', Request::username('username'));
     PageLayout::setHelpKeyword('Basis.Homepage');
     SkipLinks::addIndex(_('Benutzerprofil'), 'user_profile', 100);
     $this->user = User::findCurrent();
     // current logged in user
     $this->perm = $GLOBALS['perm'];
     // perms of current logged in user
     $this->current_user = User::findByUsername(Request::username('username', $this->user->username));
     // current selected user
     // get additional informations to selected user
     $this->profile = new ProfileModel($this->current_user->user_id, $this->user->user_id);
     // set the page title depending on user selection
     if ($this->current_user['user_id'] == $this->user->id && !$this->current_user['locked']) {
         PageLayout::setTitle(_('Mein Profil'));
         UserConfig::get($this->user->id)->store('PROFILE_LAST_VISIT', time());
     } elseif ($this->current_user['user_id'] && ($this->perm->have_perm('root') || !$this->current_user['locked'] && get_visibility_by_id($this->current_user['user_id']))) {
         PageLayout::setTitle(_('Profil') . ' - ' . $this->current_user->getFullname());
         object_add_view($this->current_user->user_id);
     } else {
         PageLayout::setTitle(_('Profil'));
         $action = 'not_available';
     }
 }
Пример #7
0
 /**
  * common tasks for all actions
  */
 function before_filter(&$action, &$args)
 {
     global $perm, $template_factory;
     parent::before_filter($action, $args);
     $perm->check(Config::get()->LOCK_RULE_ADMIN_PERM ? Config::get()->LOCK_RULE_ADMIN_PERM : 'admin');
     $layout = $template_factory->open('layouts/base');
     $this->set_layout($layout);
     PageLayout::setTitle(_('Verwaltung der Sperrebenen'));
     Navigation::activateItem('/admin/locations/lock_rules');
     URLHelper::bindLinkParam('lock_rule_type', $this->lock_rule_type);
     if (!$this->lock_rule_type || !$GLOBALS['perm']->have_perm('root')) {
         $this->lock_rule_type = 'sem';
     }
     if ($this->lock_rule_type == 'sem') {
         $this->lock_rule_permissions = $GLOBALS['perm']->have_perm('root') ? array('tutor', 'dozent', 'admin', 'root') : array('tutor', 'dozent');
     } elseif ($this->lock_rule_type == 'inst') {
         $this->lock_rule_permissions = array('admin', 'root');
     } elseif ($this->lock_rule_type == 'user') {
         $this->lock_rule_permissions = array('tutor', 'dozent', 'admin', 'root');
     }
     $this->rule_type_names = array('sem' => _('Veranstaltung'), 'inst' => _('Einrichtung'), 'user' => _('Person'));
     $this->sidebar = Sidebar::Get();
     $this->sidebar->setTitle(_('Sperrebenen'));
     $this->sidebar->setImage('sidebar/lock-sidebar.png');
 }
Пример #8
0
 /**
  * This method edits existing holidays or creates new holidays
  *
  * @param mixed $id Id of the holiday or null to create one
  */
 public function edit_action($id = null)
 {
     $this->holiday = new SemesterHoliday($id);
     PageLayout::setTitle($this->holiday->isNew() ? _('Ferien anlegen') : _('Ferien bearbeiten'));
     if (Request::isPost()) {
         CSRFProtection::verifyUnsafeRequest();
         $this->holiday->name = Request::get('name');
         $this->holiday->description = Request::get('description');
         $this->holiday->beginn = $this->getTimeStamp('beginn');
         $this->holiday->ende = $this->getTimeStamp('ende', '23:59:59');
         $errors = array();
         if (!$this->holiday->name) {
             $errors[] = _('Bitte geben Sie einen Namen ein.');
         }
         if (!$this->holiday->beginn) {
             $errors[] = _('Bitte geben Sie einen Ferienbeginn ein.');
         }
         if (!$this->holiday->ende) {
             $errors[] = _('Bitte geben Sie ein Ferienende ein.');
         }
         if ($this->holiday->beginn > $this->holiday->ende) {
             $errors[] = _('Das Ferienende liegt vor dem Beginn.');
         }
         if (!empty($errors)) {
             PageLayout::postMessage(MessageBox::error(_('Ihre eingegebenen Daten sind ungültig.'), $errors));
         } elseif ($this->holiday->isDirty() && !$this->holiday->store()) {
             PageLayout::postMessage(MessageBox::error(_('Die Ferien konnten nicht gespeichert werden.')));
         } else {
             PageLayout::postMessage(MessageBox::success(_('Die Ferien wurden erfolgreich gespeichert.')));
             $this->relocate('admin/holidays');
         }
     }
 }
Пример #9
0
 /**
  * Things to do before every page load.
  */
 public function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     // AJAX request, so no page layout.
     if (Request::isXhr()) {
         $this->via_ajax = true;
         $this->set_layout(null);
         $request = Request::getInstance();
         foreach ($request as $key => $value) {
             $request[$key] = studip_utf8decode($value);
         }
         // Open base layout for normal
     } else {
         $layout = $GLOBALS['template_factory']->open('layouts/base');
         $this->set_layout($layout);
         PageLayout::setTitle(_('Anmeldesets'));
         // Get only own courses if user doesn't have permission to edit institute-wide coursesets.
         $this->onlyOwnCourses = true;
         if ($GLOBALS['perm']->have_perm('admin') || $GLOBALS['perm']->have_perm('dozent') && get_config('ALLOW_DOZENT_COURSESET_ADMIN')) {
             // We have access to institute-wide course sets, so all courses may be assigned.
             $this->onlyOwnCourses = false;
             Navigation::activateItem('/tools/coursesets/sets');
         } else {
             throw new AccessDeniedException();
         }
     }
     PageLayout::addSqueezePackage('admission');
     $this->set_content_type('text/html;charset=windows-1252');
     $views = new ViewsWidget();
     $views->setTitle(_('Aktionen'));
     $views->addLink(_('Anmeldeset anlegen'), $this->url_for('admission/courseset/configure'))->setActive($action == 'configure');
     Sidebar::Get()->addWidget($views);
 }
Пример #10
0
 public function add_new_host_action()
 {
     PageLayout::setTitle(_("Neue Lernmaterialien einstellen"));
     if (Request::submitted("nothanx")) {
         $_SESSION['Lernmarktplatz_no_thanx'] = true;
         $this->redirect("admin/hosts");
     } elseif (Request::isPost()) {
         $host = LernmarktplatzHost::findOneByUrl(trim(Request::get("url")));
         if (!$host) {
             $host = new LernmarktplatzHost();
             $host['url'] = trim(Request::get("url"));
             $host['last_updated'] = time();
             $host->fetchPublicKey();
             if ($host['public_key']) {
                 $host->store();
                 PageLayout::postMessage(MessageBox::success(_("Server wurde gefunden und hinzugefügt.")));
             } else {
                 PageLayout::postMessage(MessageBox::error(_("Server ist nicht erreichbar oder hat die Anfrage abgelehnt.")));
             }
         } else {
             $host->fetchPublicKey();
             PageLayout::postMessage(MessageBox::info(_("Server ist schon in Liste.")));
         }
         $this->redirect("admin/hosts");
     }
 }
Пример #11
0
 /**
  *
  */
 function auth_registerform()
 {
     // set up dummy user environment
     if ($GLOBALS['user']->id !== 'nobody') {
         $GLOBALS['user'] = new Seminar_User('nobody');
         $GLOBALS['perm'] = new Seminar_Perm();
         $GLOBALS['auth'] = $this;
     }
     // set up user session
     include 'lib/seminar_open.php';
     if (!$_COOKIE[get_class($GLOBALS['sess'])]) {
         $register_template = $GLOBALS['template_factory']->open('nocookies');
     } else {
         $register_template = $GLOBALS['template_factory']->open('registerform');
         $register_template->set_attribute('validator', new email_validation_class());
         $register_template->set_attribute('error_msg', $this->error_msg);
         $register_template->set_attribute('username', Request::get('username'));
         $register_template->set_attribute('Vorname', Request::get('Vorname'));
         $register_template->set_attribute('Nachname', Request::get('Nachname'));
         $register_template->set_attribute('Email', Request::get('Email'));
         $register_template->set_attribute('title_front', Request::get('title_front'));
         $register_template->set_attribute('title_rear', Request::get('title_rear'));
         $register_template->set_attribute('geschlecht', Request::int('geschlecht', 0));
     }
     PageLayout::setHelpKeyword('Basis.AnmeldungRegistrierung');
     PageLayout::setTitle(_('Registrierung'));
     // $header_template = $GLOBALS['template_factory']->open('header');
     // $header_template->current_page = _('Registrierung');
     $layout = $GLOBALS['template_factory']->open('layouts/base.php');
     $register_template->set_layout($layout);
     // include 'lib/include/html_head.inc.php';
     // echo $header_template->render();
     echo $register_template->render();
     // include 'lib/include/html_end.inc.php';
 }
Пример #12
0
 /**
  * This function is called before any output is generated or any other
  * actions are performed. Initializations happen here.
  *
  * @param $action Name of the action to perform
  * @param $args   Arguments for the given action
  */
 public function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     $this->modules = array();
     // Set Navigation
     PageLayout::setHelpKeyword("Basis.ProfileModules");
     PageLayout::setTitle(_("Mehr Funktionen"));
     PageLayout::addSqueezePackage('lightbox');
     Navigation::activateItem('/profile/modules');
     // Get current user.
     $this->username = Request::username('username', $GLOBALS['user']->username);
     $this->user_id = get_userid($this->username);
     $this->plugins = array();
     $blubber = PluginEngine::getPlugin('Blubber');
     // Add blubber to plugin list so status can be updated.
     if ($blubber) {
         $this->plugins[] = $blubber;
     }
     // Get homepage plugins from database.
     $this->plugins = array_merge($this->plugins, PluginEngine::getPlugins('HomepagePlugin'));
     // Show info message if user is not on his own profile
     if ($this->user_id != $GLOBALS['user']->id) {
         $current_user = User::find($this->user_id);
         $message = sprintf(_('Daten von: %s %s (%s), Status: %s'), htmlReady($current_user->Vorname), htmlReady($current_user->Nachname), htmlReady($current_user->username), htmlReady($current_user->perms));
         PageLayout::postMessage(MessageBox::info($message));
     }
     $this->setupSidebar();
 }
Пример #13
0
 function before_filter(&$action, &$args)
 {
     if (Request::option('auswahl')) {
         Request::set('cid', Request::option('auswahl'));
     }
     parent::before_filter($action, $args);
     checkObject();
     $this->institute = Institute::findCurrent();
     if (!$this->institute) {
         throw new CheckObjectException(_('Sie haben kein Objekt gewählt.'));
     }
     $this->institute_id = $this->institute->id;
     //set visitdate for institute, when coming from meine_seminare
     if (Request::option('auswahl')) {
         object_set_visit($this->institute_id, "inst");
     }
     //gibt es eine Anweisung zur Umleitung?
     if (Request::get('redirect_to')) {
         $query_parts = explode('&', stristr(urldecode($_SERVER['QUERY_STRING']), 'redirect_to'));
         list(, $where_to) = explode('=', array_shift($query_parts));
         $new_query = $where_to . '?' . join('&', $query_parts);
         page_close();
         $new_query = preg_replace('/[^:0-9a-z+_\\-.#?&=\\/]/i', '', $new_query);
         header('Location: ' . URLHelper::getURL($new_query, array('cid' => $this->institute_id)));
         die;
     }
     PageLayout::setHelpKeyword("Basis.Einrichtungen");
     PageLayout::setTitle($this->institute->getFullName() . " - " . _("Kurzinfo"));
     Navigation::activateItem('/course/main/info');
 }
Пример #14
0
 /**
  * @todo der include muss weg
  */
 public function showweek_action($timestamp = null)
 {
     $calendar = Calendar::getInstance(Calendar::RANGE_INST, $this->institute_id);
     PageLayout::setTitle(getHeaderLine($this->institute_id) . ' - ' . _("Terminkalender - Wochenansicht"));
     $_SESSION['calendar_sess_control_data']['view_prv'] = 'showweek';
     Navigation::activateItem("/course/calendar/week");
     $atime = $timestamp ?: time();
     $at = date('G', $atime);
     if ($at >= $this->calendar_settings['start'] && $at <= $this->calendar_settings['end'] || !$atime) {
         $st = $this->calendar_settings['start'];
         $et = $this->calendar_settings['end'];
     } elseif ($at < $this->calendar_settings['start']) {
         $st = 0;
         $et = $this->calendar_settings['start'] + 2;
     } else {
         $st = $this->calendar_settings['end'] - 2;
         $et = 23;
     }
     include_once $GLOBALS['RELATIVE_PATH_CALENDAR'] . '/lib/DbCalendarWeek.class.php';
     $this->_calendar = $calendar;
     $this->atime = $atime;
     $this->cmd = 'showweek';
     $this->st = $st;
     $this->et = $et;
 }
Пример #15
0
 /**
  * This method edits an existing semester or creates a new semester.
  *
  * @param mixed $id Id of the semester or null to create a semester.
  */
 public function edit_action($id = null)
 {
     $this->semester = new Semester($id);
     PageLayout::setTitle($this->semester->isNew() ? _('Semester anlegen') : _('Semester bearbeiten'));
     if (Request::isPost()) {
         CSRFProtection::verifyUnsafeRequest();
         // Extract values
         $this->semester->name = Request::get('name');
         $this->semester->description = Request::get('description');
         $this->semester->semester_token = Request::get('token');
         $this->semester->beginn = $this->getTimeStamp('beginn');
         $this->semester->ende = $this->getTimeStamp('ende', '23:59:59');
         $this->semester->vorles_beginn = $this->getTimeStamp('vorles_beginn');
         $this->semester->vorles_ende = $this->getTimeStamp('vorles_ende', '23:59:59');
         // Validate
         $errors = $this->validateSemester($this->semester);
         // If valid, try to store the semester
         if (empty($errors) && $this->semester->isDirty() && !$this->semester->store()) {
             $errors[] = _('Fehler bei der Speicherung Ihrer Daten. Bitte überprüfen Sie Ihre Angaben.');
         }
         // Output potential errors or show success message and relocate
         if (count($errors) === 1) {
             $error = reset($errors);
             PageLayout::postMessage(MessageBox::error($error));
         } elseif (!empty($errors)) {
             $message = _('Ihre eingegebenen Daten sind ungültig.');
             PageLayout::postMessage(MessageBox::error($message, $errors));
         } else {
             $message = _('Das Semester wurde erfolgreich gespeichert.');
             PageLayout::postMessage(MessageBox::success($message));
             $this->relocate('admin/semester');
         }
         $this->errors = $errors;
     }
 }
Пример #16
0
 /**
  * Displays a page.
  */
 public function index_action($id = null)
 {
     Navigation::activateItem('/course/literature/view');
     PageLayout::setTitle($_SESSION['SessSemName']["header_line"] . " - " . _("Literatur"));
     $this->list = StudipLitList::GetFormattedListsByRange($_SESSION["SessionSeminar"], object_get_visit($_SESSION["SessionSeminar"], "literature"));
     $this->_range_id = $_SESSION["SessionSeminar"];
 }
Пример #17
0
 /**
  * Set up this controller.
  *
  * @param String $action Name of the action to be invoked
  * @param Array  $args   Arguments to be passed to the action method
  */
 public function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     PageLayout::setTitle(_('Allgemeine Einstellungen anpassen'));
     Navigation::activateItem('/profile/settings/general');
     SkipLinks::addIndex(_('Allgemeine Einstellungen anpassen'), 'layout_content', 100);
 }
Пример #18
0
 /**
  * Set up this controller and define the infobox.
  *
  * @param String $action Name of the action to be invoked
  * @param Array  $args   Arguments to be passed to the action method
  */
 public function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     PageLayout::setHelpKeyword('Basis.HomepageLebenslauf');
     PageLayout::setTitle($this->user->perms == 'dozent' ? _('Lebenslauf, Arbeitsschwerpunkte und Publikationen bearbeiten') : _('Lebenslauf bearbeiten'));
     Navigation::activateItem('/profile/edit/details');
     SkipLinks::addIndex(_('Private Daten bearbeiten'), 'layout_content');
 }
Пример #19
0
 /**
  * Set up this controller.
  *
  * @param String $action Name of the action to be invoked
  * @param Array  $args   Arguments to be passed to the action method
  */
 public function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     PageLayout::setHelpKeyword('Basis.MyStudIPPrivacy');
     PageLayout::setTitle(_('Privatsphäre'));
     Navigation::activateItem('/profile/settings/privacy');
     SkipLinks::addIndex(_('Privatsphäre'), 'layout_content', 100);
 }
Пример #20
0
 public function new_topic_action()
 {
     Navigation::activateItem('/course/schedule/dates');
     if (Request::isAjax()) {
         PageLayout::setTitle(_("Thema hinzufügen"));
     }
     $this->date = new CourseDate(Request::option("termin_id"));
     $this->course = Course::findCurrent();
 }
Пример #21
0
 /**
  * Set up this controller and define the infobox
  *
  * @param String $action Name of the action to be invoked
  * @param Array  $args   Arguments to be passed to the action method
  */
 public function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     PageLayout::setHelpKeyword('Basis.HomepagePersönlicheDaten');
     PageLayout::setTitle(_('Benutzerkonto bearbeiten'));
     Navigation::activateItem('/profile/edit/profile');
     SkipLinks::addIndex(_('Benutzerkonto bearbeiten'), 'layout_content');
     Sidebar::get()->setImage('sidebar/person-sidebar.png');
 }
Пример #22
0
 public function index_action()
 {
     PageLayout::setHelpKeyword("Basis.MeineStudiengruppen");
     PageLayout::setTitle(_("Meine Studiengruppen"));
     URLHelper::removeLinkParam('cid');
     $this->studygroups = MyRealmModel::getStudygroups();
     $this->nav_elements = MyRealmModel::calc_single_navigation($this->studygroups);
     $this->set_sidebar();
 }
Пример #23
0
 function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     if (!$GLOBALS['perm']->have_perm("root")) {
         throw new AccessDeniedException();
     }
     PageLayout::setHelpKeyword("Admins.SemClasses");
     PageLayout::setTitle("Veranstaltungskategorien");
 }
Пример #24
0
 public function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     //Configurations for the Documentarea for this user
     $this->userConfig = DocUsergroupConfig::getUserConfig($GLOBALS['user']->id);
     $this->set_layout($GLOBALS['template_factory']->open('layouts/base'));
     PageLayout::setTitle(_('Dateiverwaltung'));
     PageLayout::setHelpKeyword('Basis.Dateien');
     Navigation::activateItem('/document/files');
 }
Пример #25
0
 public function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     PageLayout::setTitle(_('Studiengruppen suchen'));
     Navigation::activateItem('/community/studygroups/browse');
     PageLayout::setHelpKeyword('Basis.SuchenStudiengruppen');
     // add skip link
     SkipLinks::addIndex(Navigation::getItem('/community/studygroups/browse')->getTitle(), 'layout_content', 100);
     Sidebar::get()->setImage('sidebar/studygroup-sidebar.png');
 }
Пример #26
0
 /**
  * Set up this controller.
  *
  * @param String $action Name of the action to be invoked
  * @param Array  $args   Arguments to be passed to the action method
  */
 public function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     require_once 'lib/deputies_functions.inc.php';
     PageLayout::setHelpKeyword('Basis.MyStudIPDeputies');
     PageLayout::setTitle(_('Standardvertretung'));
     Navigation::activateItem('/profile/settings/deputies');
     SkipLinks::addIndex(_('Standardvertretung'), 'main_content', 100);
     $this->edit_about_enabled = get_config('DEPUTIES_EDIT_ABOUT_ENABLE');
 }
Пример #27
0
 /**
  * Set up this controller.
  *
  * @param String $action Name of the action to be invoked
  * @param Array  $args   Arguments to be passed to the action method
  */
 public function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     PageLayout::setHelpKeyword('Basis.HomepageNutzerdomänen');
     PageLayout::setTitle(_('Nutzerdomänen bearbeiten'));
     Navigation::activateItem('/profile/edit/userdomains');
     SkipLinks::addIndex(_('Zugeordnete Nutzerdomänen'), 'assigned_userdomains');
     SkipLinks::addIndex(_('Nutzerdomäne auswählen'), 'select_userdomains');
     Sidebar::get()->setImage('sidebar/admin-sidebar.png');
 }
Пример #28
0
 /**
  *
  **/
 public function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     $GLOBALS['perm']->check('autor');
     $layout = $GLOBALS['template_factory']->open('layouts/base');
     $this->set_layout($layout);
     Navigation::activateItem('/profile/settings/api');
     PageLayout::setTitle(_('Applikationen'));
     $this->types = array('website' => _('Website'), 'program' => _('Herkömmliches Desktopprogramm'), 'app' => _('Mobile App'));
 }
Пример #29
0
 public function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     // Check permissions to be on this site
     if (!$GLOBALS['perm']->have_perm('root')) {
         throw new AccessDeniedException();
     }
     PageLayout::setTitle(_('Schritte im Veranstaltungsanlegeassistenten'));
     Navigation::activateItem('/admin/config/coursewizardsteps');
 }
Пример #30
0
 public function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     checkObject();
     checkObjectModule("schedule");
     PageLayout::setTitle(sprintf('%s - %s', Course::findCurrent()->getFullname(), _("Themen")));
     $seminar = new Seminar(Course::findCurrent());
     $this->forum_activated = $seminar->getSlotModule('forum');
     $this->documents_activated = $seminar->getSlotModule('documents');
 }