function getTabNavigation($course_id) { if (TRUE) { $temp = ScmTabEntry::findByRange_id($course_id, 'ORDER BY position ASC'); if ($temp) { $scms = SimpleORMapCollection::createFromArray($temp); $navigation = new Navigation($scms->first()->tab_name ?: _('Informationen')); $navigation->setImage('icons/16/white/infopage.png'); $navigation->setActiveImage('icons/16/black/infopage.png'); foreach ($scms as $scm) { $scm_link = PluginEngine::getLink($this, array(), 'show/' . $scm->id); $nav = new Navigation($scm['tab_name'], $scm_link); $nav->setImage('icons/16/white/infopage.png'); $nav->setActiveImage('icons/16/black/infopage.png'); Navigation::addItem('course/scmTabs' . $scm->id, $nav); } return null; //array('scm' => $navigation); } else { $scm = new ScmTabEntry($id); $scm->tab_name = 'Infoseite'; $scm->user_id = $GLOBALS['user']->id; $scm->range_id = $GLOBALS['SessSemName'][1]; $scm->store(); $scm_link = PluginEngine::getLink($this, array(), 'show/' . $scm->id); $nav = new Navigation($scm->tab_name, $scm_link); $nav->setImage('icons/16/white/infopage.png'); $nav->setActiveImage('icons/16/black/infopage.png'); Navigation::addItem('course/scmTabs' . $scm->id, $nav); return null; } } else { return null; } }
public function perform($unconsumed_path) { //$this->setupAutoload(); $dispatcher = new Trails_Dispatcher($this->getPluginPath(), rtrim(PluginEngine::getLink($this, array(), null), '/'), 'show'); $dispatcher->plugin = $this; $dispatcher->dispatch($unconsumed_path); }
function perform($unconsumed_path) { $trails_root = $this->getPluginPath() . "/app"; $dispatcher = new Trails_Dispatcher($trails_root, rtrim(PluginEngine::getURL($this, null, ''), '/'), self::DEFAULT_CONTROLLER); $dispatcher->plugin = $this; $dispatcher->dispatch($unconsumed_path); }
public function __construct() { parent::__construct(); $nav = new Navigation(_("Downloads"), PluginEngine::getURL($this, array(), "downloadarea/overview")); $nav->setImage(Icon::create("download", "navigation")); Navigation::addItem("/downloader", $nav); }
function startpage_redirect($page_code) { switch ($page_code) { case 1: case 2: $jump_page = "dispatch.php/my_courses"; break; case 3: $jump_page = "dispatch.php/calendar/schedule"; break; case 4: $jump_page = "dispatch.php/contact"; break; case 5: $jump_page = "dispatch.php/calendar/single"; break; case 6: // redirect to global blubberstream // or no redirection if blubber isn't active if (PluginEngine::getPlugin("Blubber")) { $jump_page = "plugins.php/blubber/streams/global"; } break; } page_close(); header("location: {$jump_page}"); exit; }
function getPortalTemplate() { $dispatcher = new StudipDispatcher(); $controller = new NewsController($dispatcher); $response = $controller->relay('news/display/studip'); $template = $GLOBALS['template_factory']->open('shared/string'); $template->content = $response->body; if (StudipNews::CountUnread() > 0) { $navigation = new Navigation('', PluginEngine::getLink($this, array(), 'read_all')); $navigation->setImage(Icon::create('refresh', 'clickable', ["title" => _('Alle als gelesen markieren')])); $icons[] = $navigation; } if (get_config('NEWS_RSS_EXPORT_ENABLE')) { if ($rss_id = StudipNews::GetRssIdFromRangeId('studip')) { $navigation = new Navigation('', 'rss.php', array('id' => $rss_id)); $navigation->setImage(Icon::create('rss', 'clickable', ["title" => _('RSS-Feed')])); $icons[] = $navigation; } } if ($GLOBALS['perm']->have_perm('root')) { $navigation = new Navigation('', 'dispatch.php/news/edit_news/new/studip'); $navigation->setImage(Icon::create('add', 'clickable', ["title" => _('Ankündigungen bearbeiten')]), ["rel" => 'get_dialog']); $icons[] = $navigation; if (get_config('NEWS_RSS_EXPORT_ENABLE')) { $navigation = new Navigation('', 'dispatch.php/news/rss_config/studip'); $navigation->setImage(Icon::create('rss+add', 'clickable', ["title" => _('RSS-Feed konfigurieren')]), ["data-dialog" => 'size=auto']); $icons[] = $navigation; } } $template->icons = $icons; return $template; }
public function __construct() { parent::__construct(); if ($GLOBALS['perm']->have_perm("autor")) { $topicon = new Navigation(_("Lernmaterialien"), PluginEngine::getURL($this, array(), "market/overview")); $topicon->setImage(Icon::create('service', 'navigation')); Navigation::addItem("/lernmarktplatz", $topicon); Navigation::addItem("/lernmarktplatz/overview", new Navigation(_("Lernmarktplatz"), PluginEngine::getURL($this, array(), "market/overview"))); Navigation::addItem("/lernmarktplatz/mymaterial", new Navigation(_("Meine Materialien"), PluginEngine::getURL($this, array(), "mymaterial/overview"))); } if ($GLOBALS['perm']->have_perm("root")) { $tab = new Navigation(_("Lernmarktplatz"), PluginEngine::getURL($this, array(), "admin/hosts")); Navigation::addItem("/admin/config/lernmarktplatz", $tab); } if (UpdateInformation::isCollecting() && stripos(Request::get("page"), "plugins.php/lernmarktplatz/market/discussion/") !== false) { $data = Request::getArray("page_info"); $last_update = Request::get("server_timestamp", time() - 30); $review_id = $data['Lernmarktplatz']['review_id']; $output = array('comments' => array()); $comments = LernmarktplatzComment::findBySQL("review_id = :review_id AND mkdate >= :last_update ORDER BY mkdate ASC", array('last_update' => $last_update, 'review_id' => $review_id)); $tf = new Flexi_TemplateFactory(__DIR__ . "/views"); foreach ($comments as $comment) { $template = $tf->open("market/_comment.php"); $template->set_attribute('comment', $comment); $output['comments'][] = array('comment_id' => $comment->getId(), 'html' => $template->render()); } UpdateInformation::setInformation("Lernmarktplatz.update", $output); } }
function link_for($to = '', $params = array()) { if ($to === '') { $to = substr(strtolower(get_class($this)), 0, -10) . '/' . $this->current_action; } return PluginEngine::getLink($this->plugin, $params, $to); }
public function __construct() { parent::__construct(); if (false) { //Suche ersetzen if (Navigation::hasItem("/search")) { $nav = Navigation::getItem("/search"); $nav->setURL(PluginEngine::getURL($this, array(), "search")); foreach ($nav->getSubNavigation() as $name => $nav_object) { $nav->removeSubNavigation($name); } $tab = new AutoNavigation(_("Suche"), PluginEngine::getURL($this, array(), "search")); $nav->addSubNavigation('search', $tab); } } else { //Suche erweitern if (Navigation::hasItem("/search")) { $nav = Navigation::getItem("/search"); $nav->setURL(PluginEngine::getURL($this, array(), "search")); $tab = new AutoNavigation(_("Suche"), PluginEngine::getURL($this, array(), "search")); $nav->addSubNavigation('search', $tab); } } //Observer definieren: NotificationCenter::addObserver($this, "show_user_avatar", "WillDisplaySearchResultItem"); NotificationCenter::addObserver($this, "show_seminar_avatar", "WillDisplaySearchResultItem"); NotificationCenter::addObserver($this, "show_document_avatar", "WillDisplaySearchResultItem"); NotificationCenter::addObserver($this, "add_calculator", "LastAlteringOfSearchResults"); NotificationCenter::addObserver($this, "filter_study_areas", "GlobalSearchFilter"); }
public function __construct() { parent::__construct(); if ($GLOBALS['perm']->have_perm("root")) { $processes = FleximportProcess::findBySQL("1=1 ORDER BY name ASC"); $navigation = new Navigation($this->getDisplayName()); $navigation->setURL(PluginEngine::getURL($this, array(), 'import/overview' . (count($processes) ? "/" . $processes[0]['process_id'] : ""))); Navigation::addItem('/start/fleximport', $navigation); Navigation::addItem('/fleximport', $navigation); if (count($processes)) { foreach ($processes as $process) { $navigation = new Navigation($process['name'], PluginEngine::getURL($this, array(), 'import/overview/' . $process->getId())); Navigation::addItem('/fleximport/process_' . $process->getId(), $navigation); } } else { $navigation = new Navigation(_("Import"), PluginEngine::getURL($this, array(), 'import/overview')); Navigation::addItem('/fleximport/overview', $navigation); } $navigation = new Navigation(_("Konfiguration"), PluginEngine::getURL($this, array(), 'config/overview')); Navigation::addItem('/fleximport/config', $navigation); if (FleximportConfig::get("DISPLAY_AT_HEADER")) { if (is_numeric(FleximportConfig::get("DISPLAY_AT_HEADER"))) { Navigation::getItem('/fleximport')->setImage(version_compare($GLOBALS['SOFTWARE_VERSION'], "3.4", ">=") ? Icon::create("install", "navigation") : Assets::image_path("icons/lightblue/install.svg")); } else { Navigation::getItem('/fleximport')->setImage(version_compare($GLOBALS['SOFTWARE_VERSION'], "3.4", ">=") ? Icon::create(FleximportConfig::get("DISPLAY_AT_HEADER"), "navigation") : FleximportConfig::get("DISPLAY_AT_HEADER")); } } } }
public function initialize() { PageLayout::addSqueezePackage('lightbox'); $this->addStylesheet('assets/pluginmarket.less'); PageLayout::addHeadElement('link', array('rel' => 'alternate', 'type' => 'application/rss+xml', 'href' => PluginEngine::getLink($this, array(), 'rss/newest'), 'title' => _('Neueste Plugins'))); $sidebar = Sidebar::Get(); $sidebar->setImage('../../' . $this->getPluginPath() . '/assets/sidebar-marketplace.png'); }
function __construct() { parent::__construct(); if (is_object($GLOBALS['perm']) && $GLOBALS['perm']->have_perm('admin')) { $navigation = new Navigation(_("Veranstaltungs-Vervielfältiger"), PluginEngine::getUrl($this, array(), 'index')); Navigation::insertItem('/start/replicator', $navigation, 'search'); } }
public function __construct() { parent::__construct(); if ($GLOBALS['perm']->have_perm("root")) { $nav = new Navigation(_("Datenbank"), PluginEngine::getURL($this, array(), "database/overview")); Navigation::addItem("/admin/adminer", $nav); } }
/** * Loads all possible standard plugins for the given seminars and adds * a navigation entry for each one. * * @param array $seminars List of seminars * @return array Extended list of seminars */ protected function get_plugin_navigations($seminars) { foreach ($seminars as $id => $seminar) { foreach (PluginEngine::getPlugins('StandardPlugin', $id) as $plugin) { $seminars[$id]['navigations'][] = $plugin->getIconNavigation($id, time(), $GLOBALS['user']->id); } } return $seminars; }
/** * constructor * * @access public */ function StudipSemTreeViewAdmin($start_item_id = "root"){ $this->start_item_id = ($start_item_id) ? $start_item_id : "root"; $this->root_content = $GLOBALS['UNI_INFO']; parent::TreeView("StudipSemTree"); //calling the baseclass constructor $this->studienmodulmanagement = PluginEngine::getPlugin('StudienmodulManagement'); URLHelper::bindLinkParam("_marked_item", $this->marked_item); $this->marked_sem =& $_SESSION['_marked_sem']; $this->parseCommand(); }
public function __construct() { parent::__construct(); $this->raumbelegung = new raumbelegung(); //Navigationselement AutoNavigation $navigation = new AutoNavigation($this->getDisplayName(), PluginEngine::getURL($this, array(), "show")); $tools = new AutoNavigation("Tools", PluginEngine::getURL($this, array(), "start")); //Punkt an dem das Elements eingesetzt werden soll Navigation::addItem('/start/Raumbelgungen/', clone $navigation); }
public function __construct() { parent::__construct(); $this->addStylesheet("assets/defaultform.less"); $nav = new Navigation(_("DefaultForm"), PluginEngine::getURL($this, array(), "example/index")); Navigation::addItem("/start/defaultform", $nav); $nav = clone $nav; $nav->addSubNavigation("index", clone $nav); Navigation::addItem("/defaultform", $nav); }
/** * This method dispatches and displays all actions. It uses the template * method design pattern, so you may want to implement the methods #route * and/or #display to adapt to your needs. * * @param string the part of the dispatch path, that were not consumed yet * * @return void */ function perform($unconsumed_path) { if (!$unconsumed_path) { header("Location: " . PluginEngine::getUrl($this), 302); return false; } $trails_root = $this->getPluginPath(); $dispatcher = new Trails_Dispatcher($trails_root, null, 'show'); $dispatcher->current_plugin = $this; $dispatcher->dispatch($unconsumed_path); }
function edit_action($area_id) { ForumPerm::check('edit_area', $this->getId(), $area_id); if (Request::isAjax()) { ForumEntry::update($area_id, studip_utf8decode(Request::get('name')), studip_utf8decode(Request::get('content'))); $this->render_json(array('content' => ForumEntry::killFormat(ForumEntry::killEdit(studip_utf8decode(Request::get('content')))))); } else { ForumEntry::update($area_id, Request::get('name'), Request::get('content')); $this->flash['messages'] = array('success' => _('Die Änderungen am Bereich wurden gespeichert.')); $this->redirect(PluginEngine::getLink('coreforum/index/index')); } }
public function getPortalTemplate() { PageLayout::addScript($this->getPluginUrl() . '/js/QuickSelection.js'); $names = WidgetHelper::getWidgetUserConfig($GLOBALS['user']->id, 'QUICK_SELECTION'); $template_factory = new Flexi_TemplateFactory(__DIR__ . '/templates'); $template = $template_factory->open('list'); $template->navigation = $this->getFilteredNavigation($names); $navigation = new Navigation('', PluginEngine::getLink($this, array(), 'configuration')); $navigation->setImage(Icon::create('edit', 'clickable', ["title" => _('Konfigurieren')]), array('data-dialog' => 'size=auto')); $template->icons = array($navigation); return $template; }
/** * Set the posting denoted by the passed topic_id as liked for the * currently logged in user * * @param string $topic_id */ static function like($topic_id) { $stmt = DBManager::get()->prepare("REPLACE INTO\n forum_likes (topic_id, user_id)\n VALUES (?, ?)"); $stmt->execute(array($topic_id, $GLOBALS['user']->id)); // get posting owner $data = ForumEntry::getConstraints($topic_id); // notify owner of posting about the like setTempLanguage($data['user_id']); $notification = get_fullname($GLOBALS['user']->id) . _(' gefällt einer deiner Forenbeiträge!'); restoreLanguage(); PersonalNotifications::add($data['user_id'], PluginEngine::getURL('coreforum/index/index/' . $topic_id . '?highlight_topic=' . $topic_id . '#' . $topic_id), $notification, $topic_id, Icon::create('forum', 'clickable')->asImagePath(40)); }
function url_for($to) { $args = func_get_args(); # find params $params = array(); if (is_array(end($args))) { $params = array_pop($args); } # urlencode all but the first argument $args = array_map('urlencode', $args); $args[0] = $to; return PluginEngine::getURL($this->dispatcher->current_plugin, $params, join('/', $args)); }
/** * constructor * * @access public */ function StudipSemTreeViewSimple($start_item_id = "root", $sem_number = false, $sem_status, $visible_only = false) { $this->start_item_id = $start_item_id ? $start_item_id : "root"; $this->root_content = $GLOBALS['UNI_INFO']; $args = null; if ($sem_number !== false) { $args['sem_number'] = $sem_number; } if ($sem_status !== false) { $args['sem_status'] = $sem_status; } $args['visible_only'] = $visible_only; $this->tree = TreeAbstract::GetInstance("StudipSemTree", $args); $this->tree->enable_lonely_sem = false; if (!$this->tree->tree_data[$this->start_item_id]) { $this->start_item_id = "root"; } $this->studienmodulmanagement = PluginEngine::getPlugin('StudienmodulManagement'); }
public function save_review_action($plugin_id) { if (!Request::isPost()) { throw new Exception("Wrong method, use POST."); } $this->marketplugin = MarketPlugin::find($plugin_id); if (!$this->marketplugin) { throw new Exception("Unknown plugin."); } $reviews = MarketReview::findBySQL("plugin_id = ? AND user_id = ?", array($plugin_id, $GLOBALS['user']->id)); if (count($reviews)) { $this->review = $reviews[0]; } else { $this->review = new MarketReview(); $this->review['plugin_id'] = $plugin_id; $this->review['user_id'] = $GLOBALS['user']->id; } $data = Request::getArray("data"); $this->review['review'] = trim($data['review']) ?: null; if ($data['rating'] <= 5 && $data['rating'] >= 0) { $this->review['rating'] = $data['rating']; } else { throw new Exception("Rating is not in accepted range."); } $this->review->store(); PersonalNotifications::add($this->marketplugin['user_id'], PluginEngine::getURL($this->plugin, array(), "presenting/details/" . $plugin_id), sprintf(_("Ihr Plugin %s wurde von %s bewertet."), $this->marketplugin['name'], get_fullname($GLOBALS['user']->id)), null, Assets::image_path("icons/blue/star.svg")); PageLayout::postMessage(MessageBox::success(_("Review/Bewertung wurde gespeichert."))); $this->redirect('presenting/details/' . $plugin_id); }
function in_archiv ($sem_id) { global $SEM_CLASS,$SEM_TYPE, $ARCHIV_PATH, $TMP_PATH, $ZIP_PATH, $ZIP_OPTIONS, $_fullname_sql; NotificationCenter::postNotification('CourseWillArchive', $sem_id); //Besorgen der Grunddaten des Seminars $query = "SELECT Seminar_id, Name, Untertitel, Beschreibung, start_time, Institut_id, status FROM seminare WHERE Seminar_id = ?"; $statement = DBManager::get()->prepare($query); $statement->execute(array($sem_id)); $row = $statement->fetch(PDO::FETCH_ASSOC); $seminar_id = $row['Seminar_id']; $name = $row['Name']; $untertitel = $row['Untertitel']; $beschreibung = $row['Beschreibung']; $start_time = $row['start_time']; $heimat_inst_id = $row['Institut_id']; //Besorgen von einzelnen Daten zu dem Seminar $semester = new SemesterData; $all_semester = $semester->getAllSemesterData(); foreach ($all_semester as $sem) { if (($start_time >= $sem['beginn']) && ($start_time <= $sem['ende'])) { $semester_tmp = $sem['name']; } } //Studienbereiche if ($SEM_CLASS[$SEM_TYPE[$row['status']]['class']]['bereiche']) { $sem_path = get_sem_tree_path($seminar_id); if (is_array($sem_path)) { $studienbereiche = join(', ', $sem_path); } } // das Heimatinstitut als erstes $query = "SELECT Name FROM Institute WHERE Institut_id = ?"; $statement = DBManager::get()->prepare($query); $statement->execute(array($heimat_inst_id)); $institute = $statement->fetchColumn(); // jetzt den Rest $query = "SELECT Name FROM Institute LEFT JOIN seminar_inst USING (institut_id) WHERE seminar_id = ? AND Institute.Institut_id != ?"; $statement = DBManager::get()->prepare($query); $statement->execute(array($seminar_id, $heimat_inst_id)); while ($temp = $statement->fetchColumn()) { $institute .= ', ' . $temp; } $query = "SELECT GROUP_CONCAT({$_fullname_sql['full']} SEPARATOR ', ') FROM seminar_user LEFT JOIN auth_user_md5 USING (user_id) LEFT JOIN user_info USING (user_id) WHERE seminar_id = ? AND seminar_user.status = 'dozent'"; $statement = DBManager::get()->prepare($query); $statement->execute(array($seminar_id)); $dozenten = $statement->fetchColumn(); $query = "SELECT fakultaets_id FROM seminare LEFT JOIN Institute USING (Institut_id) WHERE Seminar_id = ?"; $statement = DBManager::get()->prepare($query); $statement->execute(array($seminar_id)); $fakultaet_id = $statement->fetchColumn(); $query = "SELECT GROUP_CONCAT(DISTINCT c.Name SEPARATOR ' | ') FROM seminar_inst AS a LEFT JOIN Institute AS b USING (Institut_id) LEFT JOIN Institute AS c ON (c.Institut_id = b.fakultaets_id) WHERE a.seminar_id = ?"; $statement = DBManager::get()->prepare($query); $statement->execute(array($seminar_id)); $fakultaet = $statement->fetchColumn(); setTempLanguage(); // use $DEFAULT_LANGUAGE for archiv-dumps //Dump holen $dump = dump_sem($sem_id, 'nobody'); //Forumdump holen foreach (PluginEngine::getPlugins('ForumModule', $sem_id) as $plugin) { $forumdump .= $plugin->getDump($sem_id); } // Wikidump holen $wikidump = getAllWikiPages($sem_id, $name, FALSE); restoreLanguage(); //OK, naechster Schritt: Kopieren der Personendaten aus seminar_user in archiv_user $query = "INSERT INTO archiv_user (seminar_id, user_id, status) SELECT Seminar_id, user_id, status FROM seminar_user WHERE Seminar_id = ?"; $statement = DBManager::get()->prepare($query); $statement->execute(array($seminar_id)); // Eventuelle Vertretungen in der Veranstaltung haben weiterhin Zugriff mit Dozentenrechten if (get_config('DEPUTIES_ENABLE')) { $deputies = getDeputies($seminar_id); // Eintragen ins Archiv mit Zugriffsberechtigung "dozent" $query = "INSERT IGNORE INTO archiv_user SET seminar_id = ?, user_id = ?, status = 'dozent'"; $statement = DBManager::get()->prepare($query); foreach ($deputies as $deputy) { $statement->execute(array($seminar_id, $deputy['user_id'])); } } $Modules = new Modules; $Modules = $Modules->getLocalModules($sem_id); $folder_tree = TreeAbstract::GetInstance('StudipDocumentTree', array('range_id' => $sem_id,'entity_type' => 'sem')); if ($Modules['documents_folder_permissions'] || StudipDocumentTree::ExistsGroupFolders($sem_id)) { $unreadable_folders = $folder_tree->getUnReadableFolders('nobody'); } $query = "SELECT COUNT(dokument_id) FROM dokumente WHERE seminar_id = ? AND url = ''"; $statement = DBManager::get()->prepare($query); $statement->execute(array($seminar_id)); $count = $statement->fetchColumn(); if ($count) { $hash_secret = "frauen"; $archiv_file_id = md5(uniqid($hash_secret,1)); //temporaeres Verzeichnis anlegen $tmp_full_path = "$TMP_PATH/$archiv_file_id"; mkdir($tmp_full_path, 0700); if($folder_tree->getNumKids('root')) { $list = $folder_tree->getKids('root'); } if (is_array($list) && count($list) > 0) { $query = "SELECT folder_id, name FROM folder WHERE range_id IN (?) ORDER BY name"; $statement = DBManager::get()->prepare($query); $statement->execute(array($list)); $folder = 0; while ($row = $statement->fetch(PDO::FETCH_ASSOC)) { $folder += 1; $temp_folder = $tmp_full_path . "/[$folder]_" . prepareFilename($row['name'], FALSE); mkdir($temp_folder, 0700); createTempFolder($row['folder_id'], $temp_folder, $seminar_id, 'nobody'); } //zip all the stuff $archiv_full_path = "$ARCHIV_PATH/$archiv_file_id"; create_zip_from_directory($tmp_full_path, $tmp_full_path); @rename($tmp_full_path . '.zip', $archiv_full_path); } rmdirr($tmp_full_path); if (is_array($unreadable_folders)) { $query = "SELECT dokument_id FROM dokumente WHERE seminar_id = ? AND url = '' AND range_id IN (?)"; $statement = DBManager::get()->prepare($query); $statement->execute(array($seminar_id, $unreadable_folders)); $archiv_protected_file_id = createSelectedZip($statement->fetchAll(PDO::FETCH_COLUMN), false, false); @rename("$TMP_PATH/$archiv_protected_file_id", "$ARCHIV_PATH/$archiv_protected_file_id"); } } else { $archiv_file_id = ''; } //Reinschreiben von diversem Klumpatsch in die Datenbank $query = "INSERT INTO archiv (seminar_id, name, untertitel, beschreibung, start_time, semester, heimat_inst_id, institute, dozenten, fakultaet, dump, archiv_file_id,archiv_protected_file_id, forumdump, wikidump, studienbereiche, mkdate) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, UNIX_TIMESTAMP())"; $statement = DBManager::get()->prepare($query); $success = $statement->execute(array( $seminar_id, $name ?: '', $untertitel ?: '', $beschreibung ?: '', $start_time, $semester_tmp ?: '', $heimat_inst_id, $institute ?: '', $dozenten ?: '', $fakultaet ?: '', $dump ?: '', $archiv_file_id ?: '', $archiv_protected_file_id ?: '', $forumdump ?: '', $wikidump ?: '', $studienbereiche ?: '', )); if ($success) { NotificationCenter::postNotification('CourseDidArchive', $seminar_id); } }
<? endif ?> </div> </div> </li> <? endforeach ?> </ul> <div style="text-align: center;"> <? if ($material['host_id'] || $material['user_id'] !== $GLOBALS['user']->id) : ?> <?php echo \Studip\LinkButton::create(_("Review schreiben"), PluginEngine::getLink($plugin, array(), 'market/review/' . $material->getId()), array('data-dialog' => 1)); ?> <? endif ?> </div> </div> <? Sidebar::Get()->setImage($plugin->getPluginURL()."/assets/sidebar-service.png"); if ($GLOBALS['perm']->have_perm("autor")) { $actions = new ActionsWidget(); $actions->addLink( _("Eigenes Lernmaterial hochladen"), PluginEngine::getURL($plugin, array(), "mymaterial/edit"), Icon::create("add", "clickable"), array('data-dialog' => "1") ); Sidebar::Get()->addWidget($actions); }
<td class="areaentry"> <form class="add_area_form" method="post" action="<?php echo PluginEngine::getLink('coreforum/area/add/' . $category_id); ?> "> <?php echo CSRFProtection::tokenTag(); ?> <input type="text" name="name" size="50" maxlength="255" style="width: 99%;" placeholder="<?php echo _('Name des neuen Bereiches'); ?> " required><br> <textarea name="content" style="height: 3em; width: 99%;" placeholder="<?php echo _('Optionale Beschreibung des neuen Bereiches'); ?> "></textarea> <?php echo Studip\Button::create(_('Bereich hinzufügen')); ?> <?php echo Studip\LinkButton::createCancel(_('Abbrechen'), PluginEngine::getLink('coreforum/index/index#cat_' . $category_id)); ?> </form> </td> <td class="postings">0</td> <td class="answer" colspan="2"><br><?php echo _('keine Antworten'); ?> </td> </tr>
<form action="<?php echo PluginEngine::getLink($plugin, array(), "mymaterial/add_tags"); ?> " method="post" class="default"> <input type="text" name="tag" placeholder="<?php echo _("Thema oder Schlagwort ..."); ?> "> <input type="hidden" name="material_id" value="<?php echo $this->material->getId(); ?> "> <div data-dialog-button> <?php echo \Studip\Button::create(_("Hinzufügen")); ?> </div> </form>
<form action="<?php echo PluginEngine::getLink($plugin, array(), "market/review/" . $material->getId()); ?> " method="post" class="default"> <select name="rating"> <option value="0">0 <?php echo _("Sterne"); ?> </option> <option value="1"<?php echo $review['rating'] == 1 ? " selected" : ""; ?> >1 <?php echo _("Stern"); ?> </option> <option value="2"<?php echo $review['rating'] == 2 ? " selected" : ""; ?> >2 <?php echo _("Sterne"); ?> </option> <option value="3"<?php echo $review['rating'] == 3 ? " selected" : ""; ?> >3 <?php echo _("Sterne"); ?> </option> <option value="4"<?php
public function index_action() { $this->prelim_discussion = vorbesprechung($this->course->id); $this->title = $this->course->getFullname(); $this->course_domains = UserDomain::getUserDomainsForSeminar($this->course->id); $this->sem = new Seminar($this->course); if ($studienmodulmanagement = PluginEngine::getPlugin('StudienmodulManagement')) { foreach ($this->course->study_areas->filter(function ($m) { return $m->isModule(); }) as $module) { $this->studymodules[] = array('nav' => $studienmodulmanagement->getModuleInfoNavigation($module->id, $this->course->start_semester->id), 'title' => $studienmodulmanagement->getModuleTitle($module->id, $this->course->start_semester->id)); } } // Retrive display of sem_tree if (Config::get()->COURSE_SEM_TREE_DISPLAY) { $this->studyAreaTree = StudipStudyArea::backwards($this->course->study_areas); } else { $this->study_areas = $this->course->study_areas->filter(function ($m) { return !$m->isModule(); }); } if (Request::isXhr()) { $this->set_layout(null); $this->response->add_header('Content-Type', 'text/html;charset=Windows-1252'); header('X-Title: ' . $this->title); } else { PageLayout::setHelpKeyword("Basis.InVeranstaltungDetails"); PageLayout::setTitle($this->title . " - " . _("Details")); PageLayout::addSqueezePackage('admission'); PageLayout::addSqueezePackage('enrolment'); if ($GLOBALS['SessionSeminar'] == $this->course->id) { Navigation::activateItem('/course/main/details'); SkipLinks::addIndex(Navigation::getItem('/course/main/details')->getTitle(), 'main_content', 100); } else { $sidebarlink = true; $enrolment_info = $this->sem->getEnrolmentInfo($GLOBALS['user']->id); } $sidebar = Sidebar::Get(); if ($sidebarlink) { $sidebar->setContextAvatar(CourseAvatar::getAvatar($this->course->id)); } $sidebar->setTitle(_('Details')); $links = new ActionsWidget(); $links->addLink(_("Drucken"), URLHelper::getScriptLink("dispatch.php/course/details/index/" . $this->course->id), Icon::create('print', 'clickable'), array('class' => 'print_action', 'target' => '_blank')); if ($enrolment_info['enrolment_allowed'] && $sidebarlink) { if (in_array($enrolment_info['cause'], words('member root courseadmin'))) { $abo_msg = _("direkt zur Veranstaltung"); } else { $abo_msg = _("Zugang zur Veranstaltung"); } $links->addLink($abo_msg, URLHelper::getScriptLink("dispatch.php/course/enrolment/apply/" . $this->course->id), Icon::create('door-enter', 'clickable'), array('data-dialog' => '')); } if (Config::get()->SCHEDULE_ENABLE && !$GLOBALS['perm']->have_studip_perm("user", $this->course->id) && !$GLOBALS['perm']->have_perm('admin') && $this->sem->getMetaDateCount()) { $query = "SELECT COUNT(*) FROM schedule_seminare WHERE seminar_id = ? AND user_id = ?"; if (!DBManager::Get()->fetchColumn($query, array($this->course->id, $GLOBALS['user']->id))) { $links->addLink(_("Nur im Stundenplan vormerken"), URLHelper::getLink("dispatch.php/calendar/schedule/addvirtual/" . $this->course->id), Icon::create('info', 'clickable')); } } if ($this->send_from_search_page) { $links->addLink(_("Zurück zur letzten Auswahl"), URLHelper::getLink($this->send_from_search_page), Icon::create('link-intern', 'clickable')); } if ($links->hasElements()) { $sidebar->addWidget($links); } $sidebar->setImage('sidebar/seminar-sidebar.png'); $sidebar->setContextAvatar(CourseAvatar::getAvatar($this->course->id)); $sidebar = Sidebar::Get(); $sidebar->setImage('sidebar/seminar-sidebar.png'); $sidebar->setContextAvatar(CourseAvatar::getAvatar($this->course->id)); if ($enrolment_info['description']) { PageLayout::postMessage(MessageBox::info($enrolment_info['description'])); } } }