Exemplo n.º 1
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');
 }
Exemplo n.º 2
0
 public function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     // Lock context to user id
     $this->owner = $GLOBALS['user'];
     $this->context_id = $this->owner->id;
     $this->full_access = true;
     if (Config::get()->PERSONALDOCUMENT_OPEN_ACCESS) {
         $username = Request::username('username', $GLOBALS['user']->username);
         $user = User::findByUsername($username);
         if ($user && $user->id !== $GLOBALS['user']->id) {
             $this->owner = $user;
             $this->context_id = $user->id;
             $this->full_access = Config::get()->PERSONALDOCUMENT_OPEN_ACCESS_ROOT_PRIVILEDGED && $GLOBALS['user']->perms === 'root';
             URLHelper::bindLinkParam('username', $username);
         }
     }
     $this->limit = $GLOBALS['user']->cfg->PERSONAL_FILES_ENTRIES_PER_PAGE ?: Config::get()->ENTRIES_PER_PAGE;
     $this->userConfig = DocUsergroupConfig::getUserConfig($GLOBALS['user']->id);
     if ($this->userConfig['area_close'] == 1) {
         $this->redirect('document/closed/index');
     }
     if (Request::isPost()) {
         CSRFProtection::verifySecurityToken();
     }
     if (($ticket = Request::get('studip-ticket')) && !check_ticket($ticket)) {
         $message = _('Bei der Verarbeitung Ihrer Anfrage ist ein Fehler aufgetreten.') . "\n" . _('Bitte versuchen Sie es erneut.');
         PageLayout::postMessage(MessageBox::error($message));
         $this->redirect('document/files/index');
     }
 }
Exemplo n.º 3
0
 public function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     PageLayout::setHelpKeyword('Basis.Terminkalender');
     $this->settings = UserConfig::get($GLOBALS['user']->id)->getValue('CALENDAR_SETTINGS');
     if (!is_array($this->settings)) {
         $this->settings = Calendar::getDefaultUserSettings();
     }
     URLHelper::bindLinkParam('atime', $this->atime);
     $this->atime = Request::int('atime', time());
     $this->category = Request::int('category');
     $this->last_view = Request::option('last_view', $this->settings['view']);
     $this->action = $action;
     $this->restrictions = $this->category ? array('STUDIP_CATEGORY' => $this->category) : null;
     if ($this->category) {
         URLHelper::bindLinkParam('category', $this->category);
     }
     $self = Request::option('self');
     //   var_dump($_SESSION['SessSemName'], $self); exit;
     if (!$self && $_SESSION['SessSemName']['class'] == 'sem') {
         $this->range_id = Request::option('cid');
         Navigation::activateItem('/course/calendar');
     } else {
         $this->range_id = Request::option('range_id', $GLOBALS['user']->id);
         Navigation::activateItem('/calendar/calendar');
         URLHelper::bindLinkParam('range_id', $this->range_id);
     }
     URLHelper::bindLinkParam('last_view', $this->last_view);
 }
Exemplo n.º 4
0
 public function testBindLinkParam()
 {
     $_REQUEST['var'] = 'old';
     URLHelper::bindLinkParam('var', $var);
     $this->assertEquals('old', $var);
     $var = 'new';
     $this->assertEquals('?var=new', URLHelper::getURL(''));
 }
Exemplo n.º 5
0
 /**
 * 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();
 }
Exemplo n.º 6
0
 /**
  * show institute overview page
  *
  * @return void
  */
 function index_action()
 {
     $this->sidebar = Sidebar::get();
     $this->sidebar->setImage('sidebar/institute-sidebar.png');
     if (get_config('NEWS_RSS_EXPORT_ENABLE') && $this->institute_id) {
         $rss_id = StudipNews::GetRssIdFromRangeId($this->institute_id);
         if ($rss_id) {
             PageLayout::addHeadElement('link', array('rel' => 'alternate', 'type' => 'application/rss+xml', 'title' => 'RSS', 'href' => 'rss.php?id=' . $rss_id));
         }
     }
     URLHelper::bindLinkParam("inst_data", $this->institut_main_data);
     // (un)subscribe to institute
     if (Config::get()->ALLOW_SELFASSIGN_INSTITUTE && $GLOBALS['user']->id !== 'nobody' && !$GLOBALS['perm']->have_perm('admin')) {
         $widget = new ActionsWidget();
         if (!$GLOBALS['perm']->have_studip_perm('user', $this->institute_id)) {
             $url = URLHelper::getLink('dispatch.php/institute/overview', array('follow_inst' => 'on'));
             $widget->addLink(_('Einrichtung abonnieren'), $url);
         } elseif (!$GLOBALS['perm']->have_studip_perm('autor', $this->institute_id)) {
             $url = URLHelper::getLink('dispatch.php/institute/overview', array('follow_inst' => 'off'));
             $widget->addLink(_('Austragen aus der Einrichtung'), $url);
         }
         $this->sidebar->addWidget($widget);
         if (!$GLOBALS['perm']->have_studip_perm('user', $this->institute_id) and Request::option('follow_inst') == 'on') {
             $query = "INSERT IGNORE INTO user_inst\n                          (user_id, Institut_id, inst_perms)\n                          VALUES (?, ?, 'user')";
             $statement = DBManager::get()->prepare($query);
             $statement->execute(array($GLOBALS['user']->user_id, $this->institute_id));
             if ($statement->rowCount() > 0) {
                 log_event('INST_USER_ADD', $this->institute_id, $GLOBALS['user']->user_id, 'user');
                 PageLayout::postMessage(MessageBox::success(_("Sie haben die Einrichtung abonniert.")));
                 header('Location: ' . URLHelper::getURL('', array('cid' => $this->institute_id)));
                 die;
             }
         } elseif (!$GLOBALS['perm']->have_studip_perm('autor', $this->institute_id) and Request::option('follow_inst') == 'off') {
             $query = "DELETE FROM user_inst\n                          WHERE user_id = ?  AND Institut_id = ?";
             $statement = DBManager::get()->prepare($query);
             $statement->execute(array($GLOBALS['user']->user_id, $this->institute_id));
             if ($statement->rowCount() > 0) {
                 log_event('INST_USER_DEL', $this->institute_id, $GLOBALS['user']->user_id, 'user');
                 PageLayout::postMessage(MessageBox::success(_("Sie haben sich aus der Einrichtung ausgetragen.")));
                 header('Location: ' . URLHelper::getURL('', array('cid' => $this->institute_id)));
                 die;
             }
         }
     }
     // Fetch news
     $response = $this->relay('news/display/' . $this->institute_id);
     $this->news = $response->body;
     // Fetch  votes
     if (get_config('VOTE_ENABLE')) {
         $response = $this->relay('questionnaire/widget/' . $this->institute_id . '/institute');
         $this->questionnaires = $response->body;
     }
     // Fetch dates
     $response = $this->relay("calendar/contentbox/display/{$this->institute_id}/1210000");
     $this->dates = $response->body;
 }
Exemplo n.º 7
0
 /**
  * Return current seminar's identifier.
  *
  * @return mixed  Seminar identifier (string) or FALSE (boolean) if no
  *                seminar is selected.
  */
 public static function seminarId()
 {
     if (\Request::option('cid')) {
         return \Request::option('cid');
     }
     if ($GLOBALS['SessionSeminar']) {
         \URLHelper::bindLinkParam('cid', $GLOBALS['SessionSeminar']);
         return $GLOBALS['SessionSeminar'];
     }
     return false;
 }
Exemplo n.º 8
0
 /**
  * Callback function being called before an action is executed. If this
  * function does not return FALSE, the action will be called, otherwise
  * an error will be generated and processing will be aborted. If this function
  * already #rendered or #redirected, further processing of the action is
  * withheld.
  *
  * @param string  Name of the action to perform.
  * @param array   An array of arguments to the action.
  *
  * @return bool
  */
 function before_filter(&$action, &$args)
 {
     global $user;
     parent::before_filter($action, $args);
     $zoom = Request::int('zoom');
     $this->my_schedule_settings = UserConfig::get($user->id)->SCHEDULE_SETTINGS;
     // bind zoom, show_hidden and semester_id for all actions, even preserving them after redirect
     if (isset($zoom)) {
         URLHelper::addLinkParam('zoom', Request::int('zoom'));
         $this->my_schedule_settings['zoom'] = Request::int('zoom');
         UserConfig::get($user->id)->store('SCHEDULE_SETTINGS', $this->my_schedule_settings);
     }
     URLHelper::bindLinkParam('semester_id', $this->current_semester['semester_id']);
     URLHelper::bindLinkParam('show_hidden', $this->show_hidden);
     PageLayout::setHelpKeyword('Basis.MyStudIPStundenplan');
     PageLayout::setTitle(_('Mein Stundenplan'));
 }
Exemplo n.º 9
0
 public function display_action($range_id)
 {
     // Bind some params
     URLHelper::bindLinkParam('show_expired', $null1);
     URLHelper::bindLinkParam('preview', $null2);
     URLHelper::bindLinkParam('revealNames', $null3);
     URLHelper::bindLinkParam('sort', $null4);
     // Bind range_id
     $this->range_id = $range_id;
     $this->nobody = !$GLOBALS['user']->id || $GLOBALS['user']->id == 'nobody';
     /*
      * Insert vote
      */
     if ($vote = Request::get('vote')) {
         $vote = new StudipVote($vote);
         if (!$this->nobody && $vote && $vote->isRunning() && (!$vote->userVoted() || $vote->changeable)) {
             try {
                 $vote->insertVote(Request::getArray('vote_answers'), $GLOBALS['user']->id);
             } catch (Exception $exc) {
                 $GLOBALS['vote_message'][$vote->id] = MessageBox::error($exc->getMessage());
             }
         }
     }
     // Check if we need administration icons
     $this->admin = $range_id == $GLOBALS['user']->id || $GLOBALS['perm']->have_studip_perm('tutor', $range_id);
     // Load evaluations
     if (!$this->nobody) {
         $eval_db = new EvaluationDB();
         $this->evaluations = StudipEvaluation::findMany($eval_db->getEvaluationIDs($range_id, EVAL_STATE_ACTIVE));
     } else {
         $this->evaluations = array();
     }
     $show_votes[] = 'active';
     // Check if we got expired
     if (Request::get('show_expired')) {
         $show_votes[] = 'stopvis';
         if ($this->admin) {
             $this->evaluations = array_merge($this->evaluations, StudipEvaluation::findMany($eval_db->getEvaluationIDs($range_id, EVAL_STATE_STOPPED)));
             $show_votes[] = 'stopinvis';
         }
     }
     $this->votes = StudipVote::findBySQL('range_id = ? AND state IN (?) ORDER BY mkdate desc', array($range_id, $show_votes));
     $this->visit();
 }
Exemplo n.º 10
0
 /**
  * Common actions before any other action
  *
  * @param String $action Action to be executed
  * @param Array $args Arguments passed to the action
  * @throws Trails_Exception when either no course was found or the user
  *                          may not access this area
  */
 public function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     // Try to find a valid course
     if (Course::findCurrent()) {
         $course_id = Course::findCurrent()->id;
     } else {
         throw new Trails_Exception(404, _('Es wurde keine Veranstaltung ausgewählt!'));
     }
     if (!$GLOBALS['perm']->have_studip_perm('tutor', $course_id)) {
         throw new Trails_Exception(400);
     }
     // Get seminar instance
     $this->course = Seminar::getInstance($course_id);
     if (Navigation::hasItem('course/admin/dates')) {
         Navigation::activateItem('course/admin/dates');
     }
     $this->show = array('regular' => true, 'irregular' => true, 'roomRequest' => true);
     PageLayout::setHelpKeyword('Basis.Veranstaltungen');
     PageLayout::addSqueezePackage('raumzeit');
     $title = _('Verwaltung von Zeiten und Räumen');
     $title = $this->course->getFullname() . ' - ' . $title;
     PageLayout::setTitle($title);
     $_SESSION['raumzeitFilter'] = Request::get('newFilter');
     // bind linkParams for chosen semester and opened dates
     URLHelper::bindLinkParam('raumzeitFilter', $_SESSION['raumzeitFilter']);
     $this->checkFilter();
     $this->selection = $this->getSemestersForCourse($this->course, $_SESSION['raumzeitFilter']);
     if (!Request::isXhr()) {
         $this->setSidebar();
     } elseif (Request::isXhr() && $this->flash['update-times']) {
         $semester_id = $GLOBALS['user']->cfg->MY_COURSES_SELECTED_CYCLE;
         if ($semester_id === 'all') {
             $semester_id = '';
         }
         $this->response->add_header('X-Raumzeit-Update-Times', json_encode(studip_utf8encode(array('course_id' => $this->course->id, 'html' => Seminar::GetInstance($this->course->id)->getDatesHTML(array('semester_id' => $semester_id, 'show_room' => true)) ?: _('nicht angegeben')))));
     }
 }
Exemplo n.º 11
0
                    <? if (! empty($message)) : ?>
                    <tr>
                        <td class="blank" colspan=5>
                            <? parse_msg($message); ?>
                        </td>
                    </tr>
                    <? endif; ?>
                </table>
            </form>
            <?
        //}

    // display Seminar-List
    //if ($_SESSION['links_admin_data']['srch_on'] || $auth->auth["perm"] =="tutor" || $auth->auth["perm"] == "dozent") {
        if(isset($admin_view)){
             URLHelper::bindLinkParam('admin_view',$admin_view);
        }
        //Suchresultate abholen:
        $results = AdminList::getInstance()->getSearchResults();

        ?>
        <form name="links_admin_action" action="<?php 
echo URLHelper::getLink();
?>
" method="POST">
        <?php 
echo CSRFProtection::tokenTag();
?>
        <table border=0  cellspacing=0 cellpadding=2 align=center width="99%">
        <?
        $show_rooms_check_url = $show_rooms_check == 'on' ? '&show_rooms_check=on' : null;
Exemplo n.º 12
0
require_once 'lib/statusgruppe.inc.php';
require_once 'lib/datei.inc.php';

PageLayout::setHelpKeyword("Basis.VeranstaltungenVerwaltenGruppen");

PageLayout::setTitle(_("Verwaltung von Funktionen und Gruppen"));

Navigation::activateItem('/course/members/edit_groups');

//get ID, if a object is open
if ($SessSemName[1])
  $range_id = $SessSemName[1];
elseif (Request::option('range_id'))
    $range_id = Request::option('range_id');

URLHelper::bindLinkParam('range_id', $range_id);
URLHelper::setBaseURL($GLOBALS['ABSOLUTE_URI_STUDIP']);

//Change header_line if open object
$header_line = getHeaderLine($range_id);
if ($header_line)
  PageLayout::setTitle($header_line." - ".PageLayout::getTitle());

//Output starts here

// Rechtecheck
$_range_type = get_object_type($range_id);
if ($_range_type != 'sem' || !$perm->have_studip_perm('tutor', $range_id)) {
    echo "</td></tr></table>";
    page_close();
    die;
Exemplo n.º 13
0
 function StudipLitSearch()
 {
     global $sess, $_lit_search_plugins;
     URLHelper::bindLinkParam("_start_result", $this->start_result);
     $this->form_template = array('search_term' => array('type' => 'text', 'caption' => _("Suchbegriff"), 'info' => _("Bitte geben Sie hier einen beliebigen Suchbegriff ein.")), 'search_field' => array('type' => 'select', 'caption' => _("Suchfeld"), 'info' => _("Mögliche Suchfelder"), 'options_callback' => array($this, "getSearchFields")), 'search_truncate' => array('type' => 'select', 'caption' => _("Trunkieren"), 'info' => _("Wenn Sie eine der Trunkierungsoptionen wählen, werden alle Treffer angezeigt, die mit dem Suchbegriff beginnen (Rechts trunkieren) bzw. enden (Links trunkieren)."), 'options' => array(array('name' => _("Nein"), "value" => 'none'), array('name' => _("Rechts trunkieren"), "value" => 'right'))), 'search_operator' => array('type' => 'radio', 'options' => array(array('name' => _("UND"), 'value' => 'AND'), array('name' => _("ODER"), 'value' => 'OR'), array('name' => _("NICHT"), 'value' => 'NOT')), 'caption' => _("Verknüpfung"), 'info' => _("Wählen Sie eine Verknüpfungsart"), 'separator' => "&nbsp;", 'default_value' => "AND"));
     $search_plugins = $this->getAvailablePlugins();
     $preferred_plugin = $this->getPreferredPlugin();
     $i = 0;
     if ($preferred_plugin && isset($search_plugins[$preferred_plugin])) {
         $search_plugin_options[] = array('name' => $search_plugins[$preferred_plugin], 'value' => $preferred_plugin);
     }
     foreach ($search_plugins as $plugin_name => $plugin_displayname) {
         if ($preferred_plugin != $plugin_name) {
             $search_plugin_options[] = array('name' => $plugin_displayname, 'value' => $plugin_name);
         } else {
             unset($search_plugins[$plugin_name]);
             $search_plugins[$plugin_name] = $plugin_displayname;
         }
     }
     $outer_form_fields = array('search_plugin' => array('type' => 'select', 'caption' => _("Welchen Katalog durchsuchen ?"), 'options' => $search_plugin_options, 'default_value' => $search_plugin_options[0]['value']), 'search_term_count' => array('type' => 'hidden', 'default_value' => 1));
     $outer_form_buttons = array('search' => array('caption' => _('Suchen'), 'info' => _("Suche starten")), 'reset' => array('caption' => _('Zurücksetzen'), 'info' => _("Suche zurücksetzen")), 'change' => array('caption' => _('Auswählen'), 'info' => _("Anderen Katalog auswählen")), 'search_add' => array('caption' => _('Hinzufügen'), 'info' => _("Suchfeld hinzufügen")), 'search_sub' => array('caption' => _('Entfernen'), 'info' => _("Suchfeld entfernen")));
     $this->outer_form = new StudipForm($outer_form_fields, $outer_form_buttons, "lit_search");
     if ($this->outer_form->isClicked("search_add")) {
         $this->outer_form->form_values['search_term_count'] = $this->outer_form->getFormFieldValue('search_term_count') + 1;
     }
     if ($this->outer_form->isClicked("search_sub") && $this->outer_form->getFormFieldValue('search_term_count') > 1) {
         $this->outer_form->form_values['search_term_count']--;
     }
     $plugin_name = false;
     if ($this->outer_form->isClicked("reset") || $this->outer_form->isChanged("search_plugin")) {
         $plugin_name = $this->outer_form->getFormFieldValue("search_plugin");
         if ($this->outer_form->isClicked("reset")) {
             $this->outer_form->doFormReset();
         }
         $this->outer_form->form_values["search_plugin"] = $plugin_name;
     }
     $this->term_count = $this->outer_form->getFormFieldValue('search_term_count');
     for ($i = 0; $i < $this->term_count; ++$i) {
         foreach ($this->form_template as $name => $value) {
             $inner_form_fields[$name . "_" . $i] = $value;
         }
     }
     $this->inner_form = new StudipForm($inner_form_fields, null, "lit_search");
     if ($plugin_name !== false) {
         if ($this->outer_form->isClicked("reset")) {
             $this->inner_form->doFormReset();
         }
         $this->outer_form->form_values["search_plugin"] = $plugin_name;
     }
     if (($init_plugin_name = $this->outer_form->getFormFieldValue("search_plugin")) && in_array($init_plugin_name, array_keys($search_plugins))) {
         $init_plugin_name = "StudipLitSearchPlugin" . $init_plugin_name;
         include_once "lib/classes/lit_search_plugins/" . $init_plugin_name . ".class.php";
         $this->search_plugin = new $init_plugin_name();
     } else {
         $plugin_name = false;
         $this->outer_form->doFormReset();
         throw new Exception("Invalid SearchPlugin requested.");
     }
     if ($plugin_name !== false) {
         $this->search_plugin->doResetSearch();
         $this->start_result = 1;
     }
     $this->outer_form->form_fields['search_plugin']['info'] = $this->search_plugin->description;
 }
Exemplo n.º 14
0
include 'config.inc.php';
list($GLOBALS['SEM_CLASS'], $GLOBALS['SEM_TYPE']) = array($save_sem_class, $save_sem_type);
// Try to select the course or institute given by the parameter 'cid'
// in the current request. For compatibility reasons there is a fallback to
// the last selected one from the session
$course_id = Request::option('cid', $_SESSION['SessionSeminar']);
// Select the current course or institute if we got one from 'cid' or session.
// This also binds the global $_SESSION['SessionSeminar']
// variable to the URL parameter 'cid' for all generated links.
if (isset($course_id)) {
    selectSem($course_id) || selectInst($course_id);
    unset($course_id);
}
if (Request::get("sober") && ($GLOBALS['user']->id === "nobody" || $GLOBALS['perm']->have_perm("root"))) {
    //deactivate non-core-plugins:
    URLHelper::bindLinkParam("sober", $sober);
    PluginManager::$sober = true;
}
// load the default set of plugins
PluginEngine::loadPlugins();
// add navigation item: add modules
if ((Navigation::hasItem('/course/admin') || $GLOBALS['perm']->have_perm('admin')) && ($perm->have_studip_perm('tutor', $SessSemName[1]) && $SessSemName['class'] == 'sem') && ($SessSemName['class'] != 'sem' || !$GLOBALS['SEM_CLASS'][$GLOBALS['SEM_TYPE'][$SessSemName['art_num']]['class']]['studygroup_mode'])) {
    $plus_nav = new Navigation(_('Mehr …'), 'dispatch.php/course/plus/index');
    $plus_nav->setDescription(_("Mehr Stud.IP-Funktionen für Ihre Veranstaltung"));
    Navigation::addItem('/course/modules', $plus_nav);
}
// add navigation item for profile: add modules
if (Navigation::hasItem('/profile/edit')) {
    $plus_nav = new Navigation(_('Mehr …'), 'dispatch.php/profilemodules/index');
    $plus_nav->setDescription(_("Mehr Stud.IP-Funktionen für Ihr Profil"));
    Navigation::addItem('/profile/modules', $plus_nav);
Exemplo n.º 15
0
 /**
  * constructor
  *
  * @access public
  * @param    string  $tree_class_name    name of used tree class
  * @param    mixed   $args               argument passed to the tree class
  */
 public function TreeView($tree_class_name, $args = null)
 {
     $this->tree_class_name = $tree_class_name;
     $this->tree = TreeAbstract::GetInstance($tree_class_name, $args);
     // TODO Die Logik hinter forumgrau2 und forumgraurunt2 muss
     // komplett erneuert werden; dann können auch Instanzen der
     // Klasse "Icon" verwendet werden.
     $this->pic_open = $this->use_aging ? 'forumgraurunt2.png' : 'icons/16/blue/arr_1down.png';
     $this->pic_close = $this->use_aging ? 'forumgrau2.png' : 'icons/16/blue/arr_1right.png';
     URLHelper::bindLinkParam('open_ranges', $this->open_ranges);
     URLHelper::bindLinkParam('open_items', $this->open_items);
     $this->handleOpenRanges();
 }
Exemplo n.º 16
0
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
*/
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
require_once 'lib/export/export_linking_func.inc.php';
$intro_text = $head_text = '';
$level = Request::option('level');
$id = Request::option('id');
if ($id) {
    URLHelper::bindLinkParam('id', $id);
    URLHelper::bindLinkParam('level', $level);
}
$group_by = Request::int('group_by', 0);
// store the seleced semester in the session
if (Request::option('select_sem')) {
    $_SESSION['_default_sem'] = Request::option('select_sem');
}
$show_semester = Request::option('select_sem', $_SESSION['_default_sem']);
$sem_browse_obj = new SemBrowse(array('group_by' => 0));
$sem_browse_obj->sem_browse_data['default_sem'] = "all";
$sem_browse_obj->sem_number = false;
$sem_browse_obj->target_url = "dispatch.php/course/details/";
//teilt der nachfolgenden Include mit, wo sie die Leute hinschicken soll
$sem_browse_obj->target_id = "sem_id";
//teilt der nachfolgenden Include mit, wie die id die übergeben wird, bezeichnet werden soll
$sem_browse_obj->sem_browse_data['level'] = $level;
Exemplo n.º 17
0
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();
    $folder_system_data['cmd'] = 'tree';
    URLHelper::addLinkParam('data', $folder_system_data);
} elseif (Request::option('cmd') == 'all') {
    URLHelper::removeLinkParam('data');
    $folder_system_data = array();
    $folder_system_data['cmd'] = 'all';
    URLHelper::addLinkParam('data', $folder_system_data);
} elseif(!isset($folder_system_data['cmd'])) {
    $folder_system_data['cmd'] = 'all';
}

if (Request::option('orderby')) {
Exemplo n.º 18
0
 static function getSeminarId()
 {
     if (!Request::option('cid')) {
         if ($GLOBALS['SessionSeminar']) {
             URLHelper::bindLinkParam('cid', $GLOBALS['SessionSeminar']);
             return $GLOBALS['SessionSeminar'];
         }
         return false;
     }
     return Request::option('cid');
 }
Exemplo n.º 19
0
 /**
  * creates the 'Safeguard'
  *
  * @access  private
  * @param sign   string Sign to draw (must be "ok" or "ausruf")
  * @param text   string        The Text to draw
  * @param evalID string needed if you want to delete an evaluation (not needed)
  */
 function createSafeguard($sign, $text, $mode = NULL, $evalID = NULL, $showrangeID = NULL, $referer = NULL)
 {
     //TODO: auf messagebox bzw. createQuestion umstellen!!!
     $label = array("referer" => _("Zum vorherigen Bereich zurückkehren."), "yes" => _("Ja!"), "no" => _("Nein!"), "delete" => _("Löschen."), "template" => _("Zu den eigenen Evaluationsvorlagen verschieben."), "cancel" => _("Abbrechen."));
     $html = "   <table align=\"center\" width=\"100%\" border=0 cellpadding=3 cellspacing=0>\n" . "   <tr>\n" . "    <td width=\"34\" valign=\"middle\" style=\"vertical-align:middle;\">\n";
     if ($sign != "") {
         if ($sign == 'ok') {
             $sign = 'messagebox/info.png';
         } elseif ($sign == 'ausruf') {
             $sign = 'messagebox/question.png';
         }
         $html .= Assets::img($sign, array('class' => 'middle'));
     }
     $html .= "    </td>\n";
     $html .= "    <td align=\"left\" valign=\"middle\" style=\"vertical-align:middle;\">\n";
     $html .= "     <span class=\"" . ($sign == "ausruf" ? "eval_error" : "eval_success") . "\"><br>" . $text . "</span><br><br>\n";
     if ($referer) {
         $linkreferer = "&referer=" . $referer;
     }
     if ($mode == "delete_request") {
         $value1 = "delete_confirmed";
         $value2 = "delete_aborted";
         $request = YES;
     }
     if ($mode == "restart_request") {
         $value1 = "restart_confirmed";
         $value2 = "restart_aborted";
         $request = YES;
     }
     if ($referer) {
         URLHelper::bindLinkParam('referer', $referer);
     }
     if ($request) {
         $html .= LinkButton::createAccept(_("Ja"), URLHelper::getURL('admin_evaluation.php?evalAction=' . $value1 . '&evalID=' . $evalID . '&rangeID=' . $showrangeID), array('title' => $label["yes"])) . "\n";
         $html .= LinkButton::createCancel(_("Nein"), URLHelper::getURL('admin_evaluation.php?evalAction=' . $value2 . '&evalID=' . $evalID . '&rangeID=' . $showrangeID), array('title' => $label["no"])) . "\n";
     }
     if ($mode == "unlink_delete_request") {
         $add_cancel = !$referer ?: "&referer=" . $referer;
         $links = array(URLHelper::getURL('admin_evaluation.php?evalAction=delete_confirmed&evalID=' . $evalID . '&rangeID=' . $showrangeID), URLHelper::getURL('admin_evaluation.php?evalAction=unlink_delete_aborted&evalID=' . $evalID . '&rangeID=' . $showrangeID), URLHelper::getURL('admin_evaluation.php?evalAction=unlink_and_move&evalID=' . $evalID . '&rangeID=' . $showrangeID . $add_cancel));
         $html .= LinkButton::create(_('Löschen'), $links[0], array('title' => $label["delete"])) . "\n";
         $html .= LinkButton::create(_('Verschieben'), $links[1], array('title' => $label["template"])) . "\n";
         $html .= LinkButton::createCancel(_('Abbrechen'), $links[2], array('title' => $label["cancel"])) . "\n";
         $html .= "<br><br>";
     }
     $html .= "    </td>\n" . "   </tr>\n";
     if ($referer) {
         $html .= "    <tr><td>&nbsp;</td><td><a href=\"" . URLHelper::getLink($referer) . "\">" . $label["referer"] . "</a></td></tr>";
     }
     $html .= "   </table>\n";
     return $html;
 }