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'); }
/** * Before filter, set up the page by initializing the session and checking * all conditions. * * @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); if (!Config::Get()->ELEARNING_INTERFACE_ENABLE) { throw new AccessDeniedException(_('Elearning-Interface ist nicht aktiviert.')); } else { $this->elearning_active = true; } PageLayout::setHelpKeyword('Basis.Ilias'); PageLayout::setTitle($_SESSION['SessSemName']["header_line"] . " - " . _("Lernmodule")); checkObject(); // do we have an open object? checkObjectModule('elearning_interface'); object_set_visit_module('elearning_interface'); $this->search_key = Request::get('search_key'); $GLOBALS['search_key'] = $this->search_key; $this->cms_select = Request::quoted('cms_select'); $GLOBALS['cms_select'] = $this->cms_select; $this->open_all = Request::get('open_all'); $this->close_all = Request::get('close_all'); $this->new_account_cms = Request::get('new_account_cms'); $this->module_system_type = Request::get('module_system_type'); $this->module_id = Request::get('module_id'); $this->module_type = Request::get('module_type'); $this->anker_target = Request::get('anker_target'); $this->seminar_id = $_SESSION['SessSemName'][1]; $this->rechte = $GLOBALS['perm']->have_studip_perm('tutor', $this->seminar_id); if (!isset($GLOBALS['ELEARNING_INTERFACE_MODULES'][$this->new_account_cms])) { unset($this->new_account_cms); } if (!isset($GLOBALS['ELEARNING_INTERFACE_MODULES'][$this->cms_select])) { unset($this->cms_select); } if ($this->seminar_id != $_SESSION['elearning_open_close']["id"]) { unset($_SESSION['cache_data']); unset($_SESSION['elearning_open_close']); } if ($this->open_all != "") { $_SESSION['elearning_open_close']["all open"] = true; } elseif ($this->close_all != "") { $_SESSION['elearning_open_close']["all open"] = ""; } $_SESSION['elearning_open_close']["type"] = "seminar"; $_SESSION['elearning_open_close']["id"] = $this->seminar_id; if (Request::get('do_open')) { $this->anker_target = Request::get('do_open'); $_SESSION['elearning_open_close'][Request::get('do_open')] = true; } elseif (Request::get('do_close')) { $this->anker_target = Request::get('do_close'); $_SESSION['elearning_open_close'][Request::get('do_close')] = false; } $this->sidebar = Sidebar::get(); $this->sidebar->setImage('sidebar/learnmodule-sidebar.png'); $this->sidebar->setContextAvatar(CourseAvatar::getAvatar($this->seminar_id)); }
public function before_filter(&$action, &$args) { parent::before_filter($action, $args); global $perm; checkObject(); checkObjectModule("participants"); $this->course_id = $_SESSION['SessSemName'][1]; $this->course_title = $_SESSION['SessSemName'][0]; $this->user_id = $GLOBALS['auth']->auth['uid']; // Check dozent-perms if ($perm->have_studip_perm('dozent', $this->course_id)) { $this->is_dozent = true; } // Check tutor-perms if ($perm->have_studip_perm('tutor', $this->course_id)) { $this->is_tutor = true; } // Check autor-perms if ($perm->have_studip_perm('autor', $this->course_id)) { $this->is_autor = true; } if ($this->is_tutor) { PageLayout::setHelpKeyword("Basis.VeranstaltungenVerwaltenTeilnehmer"); } else { PageLayout::setHelpKeyword("Basis.InVeranstaltungTeilnehmer"); } // Check lock rules $this->dozent_is_locked = LockRules::Check($this->course_id, 'dozent'); $this->tutor_is_locked = LockRules::Check($this->course_id, 'tutor'); $this->is_locked = LockRules::Check($this->course_id, 'participants'); // Layoutsettings PageLayout::setTitle(sprintf('%s - %s', Course::findCurrent()->getFullname(), _("Teilnehmende"))); PageLayout::addScript('members.js'); SkipLinks::addIndex(Navigation::getItem('/course/members')->getTitle(), 'main_content', 100); object_set_visit_module('participants'); $this->last_visitdate = object_get_visit($this->course_id, 'participants'); // Check perms and set the last visit date if (!$this->is_tutor) { $this->last_visitdate = time() + 10; } // Get the max-page-value for the pagination $this->max_per_page = Config::get()->ENTRIES_PER_PAGE; $this->status_groups = array('dozent' => get_title_for_status('dozent', 2), 'tutor' => get_title_for_status('tutor', 2), 'autor' => get_title_for_status('autor', 2), 'user' => get_title_for_status('user', 2), 'accepted' => get_title_for_status('accepted', 2), 'awaiting' => _("Wartende Personen"), 'claiming' => _("Wartende Personen")); // StatusGroups for the view $this->decoratedStatusGroups = array('dozent' => get_title_for_status('dozent', 1), 'autor' => get_title_for_status('autor', 1), 'tutor' => get_title_for_status('tutor', 1), 'user' => get_title_for_status('user', 1)); //check for admission / waiting list update_admission($this->course_id); // Create new MembersModel, to get additionanl informations to a given Seminar $this->members = new MembersModel($this->course_id, $this->course_title); $this->members->checkUserVisibility(); // Set default sidebar image $sidebar = Sidebar::get(); $sidebar->setImage('sidebar/person-sidebar.png'); }
/** * Before filter, set up the page by initializing the session and checking * all conditions. * * @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); if (!Config::Get()->LITERATURE_ENABLE) { throw new AccessDeniedException(_('Die Literaturübersicht ist nicht aktiviert.')); } PageLayout::setHelpKeyword('Basis.Literatur'); checkObject(); // do we have an open object? checkObjectModule('literature'); object_set_visit_module('literature'); }
public function before_filter(&$action, &$args) { parent::before_filter($action, $args); checkObject(); checkObjectModule("schedule"); $course = Course::findCurrent(); if ($course) { PageLayout::setTitle(sprintf('%s - %s', $course->getFullname(), _("Termine"))); } else { PageLayout::setTitle(_("Termine")); } PageLayout::addSqueezePackage('tablesorter'); }
public function create_action($id, $type) { checkObject(); checkObjectModule('documents'); object_set_visit_module('documents'); if (!$GLOBALS['rechte']) { throw new AccessDeniedException(); } PageLayout::setTitle(_('Neuen Ordner erstellen')); $options = array(); $options[md5('new_top_folder')] = _('Namen auswählen oder wie Eingabe') . ' -->'; $query = "SELECT SUM(1) FROM folder WHERE range_id = ?"; $statement = DBManager::get()->prepare($query); $statement->execute(array($id)); if ($statement->fetchColumn() == 0) { $options[$id] = _('Allgemeiner Dateiordner'); } if ($type === 'sem') { $query = "SELECT statusgruppe_id AS id, statusgruppen.name AS name\n FROM statusgruppen\n LEFT JOIN folder ON (statusgruppe_id = folder.range_id)\n WHERE statusgruppen.range_id = ? AND folder_id IS NULL\n ORDER BY position"; $statement = DBManager::get()->prepare($query); $statement->execute(array($id)); $statement->setFetchMode(PDO::FETCH_ASSOC); foreach ($statement as $row) { $options[$row['id']] = sprintf(_('Dateiordner der Gruppe: %s'), $row['name']); } $issues = array(); $shown_dates = array(); $query = "SELECT themen_termine.issue_id, termine.date, folder.name, termine.termin_id, date_typ\n FROM termine\n LEFT JOIN themen_termine USING (termin_id)\n LEFT JOIN folder ON (themen_termine.issue_id = folder.range_id)\n WHERE termine.range_id = ? AND folder.folder_id IS NULL\n ORDER BY termine.date, name"; $statement = DBManager::get()->prepare($query); $statement->execute(array($id)); $statement->setFetchMode(PDO::FETCH_ASSOC); foreach ($statement as $row) { if ($row['name']) { continue; } $name = sprintf(_('Ordner für %s [%s]'), date('d.m.Y', $row['date']), $GLOBALS['TERMIN_TYP'][$row['date_typ']]['name']); if ($row['issue_id']) { if (!$issues[$row['issue_id']]) { $issues[$row['issue_id']] = new Issue(array('issue_id' => $row['issue_id'])); } $name .= ', ' . my_substr($issues[$row['issue_id']]->toString(), 0, 20); $option_id = $row['issue_id']; } else { $option_id = $row['termin_id']; } $options[$option_id] = $name; } } $this->options = $options; $this->id = $id; }
/** * Before filter, set up the page by initializing the session and checking * all conditions. * * @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); // open session page_open(array('sess' => 'Seminar_Session', 'auth' => 'Seminar_Default_Auth', 'perm' => 'Seminar_Perm', 'user' => 'Seminar_User')); // set up user session include 'lib/seminar_open.php'; if (!Config::Get()->SCM_ENABLE) { throw new AccessDeniedException(_('Die freien Informationsseiten sind nicht aktiviert.')); } $GLOBALS['auth']->login_if(Request::get('again') && $GLOBALS['auth']->auth['uid'] == 'nobody'); $this->priviledged = $GLOBALS['perm']->have_studip_perm('tutor', $GLOBALS['SessSemName'][1]); if (Request::isXhr()) { $this->set_content_type('text/html;charset=Windows-1252'); } else { $this->set_layout($GLOBALS['template_factory']->open('layouts/base')); } if (!in_array($action, words('index create edit move delete'))) { array_unshift($args, $action); $action = 'index'; } if (in_array($action, words('create edit move delete')) && !$this->priviledged) { throw new AccessDeniedException(); } if ($GLOBALS['perm']->have_studip_perm('tutor', $GLOBALS['SessSemName'][1])) { $widget = new ActionsWidget(); $widget->addLink(_('Neuen Eintrag anlegen'), URLHelper::getLink('dispatch.php/course/scm/create'), Icon::create('add', 'clickable'))->asDialog(); Sidebar::get()->addWidget($widget); } PageLayout::setHelpKeyword('Basis.Informationsseite'); Navigation::activateItem('/course/scm'); checkObject(); // do we have an open object? checkObjectModule('scm'); object_set_visit_module('scm'); // Set sidebar image $sidebar = Sidebar::get(); $sidebar->setImage('sidebar/info-sidebar.png'); }
page_close(); die; } elseif ($view == "wikiprintall") { printAllWikiPages($SessSemName[1], $SessSemName['header_line']); page_close(); die; } elseif ($view == "export_pdf") { include_once 'lib/classes/exportdocument/ExportPDF.class.php'; exportWikiPagePDF($keyword, $version); } elseif ($view == "exportall_pdf") { include_once 'lib/classes/exportdocument/ExportPDF.class.php'; exportAllWikiPagesPDF("all", Request::option('sortby')); } checkObject(); // do we have an open object? checkObjectModule("wiki"); //are we allowed to use this module here? object_set_visit_module("wiki"); PageLayout::setHelpKeyword("Basis.Wiki"); // Hilfeseite im Hilfewiki PageLayout::setTitle($SessSemName["header_line"] . " - " . _("Wiki")); if (in_array(Request::get('view'), words('listnew listall export'))) { Navigation::activateItem('/course/wiki/' . $view); } else { Navigation::activateItem('/course/wiki/show'); } if (Request::option('wiki_comments') == "all") { // show all comments $show_wiki_comments = "all"; } elseif (Request::option('wiki_comments') == "none") { // don't show comments
*/ use Studip\Button, Studip\LinkButton; require '../lib/bootstrap.php'; ob_start(); page_open(array("sess" => "Seminar_Session", "auth" => "Seminar_Auth", "perm" => "Seminar_Perm", "" . "user" => "Seminar_User")); include ('lib/seminar_open.php'); // initialise Stud.IP-Session checkObject(); checkObjectModule('documents'); object_set_visit_module('documents'); // -- here you have to put initialisations for the current page require_once 'lib/datei.inc.php'; require_once 'lib/msg.inc.php'; $open = Request::option('open'); $close = Request::option('close'); $check_all = Request::option('check_all'); //Switch fuer die Ansichten URLHelper::bindLinkParam('data', $folder_system_data); if (Request::option('cmd') == 'tree') { URLHelper::removeLinkParam('data'); $folder_system_data = array();
if ($search_key != "") { ELearningUtils::loadClass($cms_select); // require_once ($RELATIVE_PATH_ELEARNING_INTERFACE . "/" . $ELEARNING_INTERFACE_MODULES[$cms_select]["CLASS_PREFIX"] . "ConnectedCMS.class.php"); // $classname = $ELEARNING_INTERFACE_MODULES[$cms_select]["CLASS_PREFIX"] . "ConnectedCMS"; // $connected_cms[$cms_select] = new $classname($cms_select); // $connected_cms[$cms_select]->initSubclasses(); if ( strlen( trim($search_key) ) > 2) $searchresult_content_modules = $connected_cms[$cms_select]->searchContentModules($search_key); else $messages["error"] = _("Der Suchbegriff muss mindestens 3 Zeichen lang sein!"); } checkObjectModule("elearning_interface"); $infobox = array (array ("kategorie" => _("Information:"), "eintrag" => array (array ( "icon" => Icon::create('info', 'clickable'), "text" => sprintf(_("Auf dieser Seite können Sie nach Lernmodulen im angebundenen ILIAS-System suchen.")) ) ) ) ); $infobox[1]["kategorie"] = _("Aktionen:"); $infobox[1]["eintrag"][] = array ( "icon" => Icon::create('learnmodule', 'clickable'), "text" => sprintf(_("Geben Sie einen Suchbegriff ein und klicken Sie auf 'Suchen'. Die Suche bezieht sich auf den ausgewählten Suchbereich."))); ?> <table cellspacing="0" cellpadding="0" border="0" width="100%"> <tr> <td class="table_header_bold" colspan="3"> </td> </tr> <tr>