Exemplo n.º 1
0
 public function testAddLinkParam()
 {
     $this->assertEquals(array(), URLHelper::getLinkParams());
     URLHelper::addLinkParam('foo', 'bar');
     $this->assertEquals(array('foo' => 'bar'), URLHelper::getLinkParams());
     URLHelper::addLinkParam('answer', 42);
     $this->assertEquals(array('foo' => 'bar', 'answer' => '42'), URLHelper::getLinkParams());
 }
Exemplo n.º 2
0
/* ---
 * Mögliche Datenschutz-/Sichtbarkeitsentscheidung: Beim ersten Login wird ein
 * informierender Text mit Entscheidungsmöglichkeit: "Ich will sichtbar sein" oder
 * "Ich will unsichtbar sein" angezeigt.
 *
 * Bei Nutzung dieser Funktion unbedingt die Texte unter locale/de/LC_HELP/visibility_decision.php bzw.
 * locale/en/LC_HELP/visibility_decision.php an die lokalen Verhältnisse anpassen!
 */
if ($GLOBALS['USER_VISIBILITY_CHECK'] && is_object($GLOBALS['user']) && $GLOBALS['user']->id != 'nobody') {
    require_once 'lib/user_visible.inc.php';
    first_decision($GLOBALS['user']->id);
}
if (PageLayout::isHeaderEnabled()) {
    $header_template = $GLOBALS['template_factory']->open('header');
    $header_template->current_page = PageLayout::getTitle();
    $header_template->link_params = array_fill_keys(array_keys(URLHelper::getLinkParams()), NULL);
    if (is_object($GLOBALS['user']) && $GLOBALS['user']->id != 'nobody') {
        // only mark course if user is logged in and free access enabled
        if (get_config('ENABLE_FREE_ACCESS') && Navigation::hasItem('/course') && Navigation::getItem('/course')->isActive()) {
            // indicate to the template that this course is publicly visible
            // need to handle institutes separately (always visible)
            if ($GLOBALS['SessSemName']['class'] == 'inst') {
                $header_template->public_hint = _('öffentliche Einrichtung');
            } else {
                if (Course::findCurrent()->lesezugriff == 0) {
                    $header_template->public_hint = _('öffentliche Veranstaltung');
                }
            }
        }
        if ($GLOBALS['user']->cfg->getValue('ACCESSKEY_ENABLE')) {
            $header_template->accesskey_enabled = true;
Exemplo n.º 3
0
echo $GLOBALS['ASSETS_URL'];
?>
";
        STUDIP.STUDIP_SHORT_NAME = "<?php 
echo Config::get()->STUDIP_SHORT_NAME;
?>
";
        String.locale = "<?php 
echo htmlReady(strtr($_SESSION['_language'], '_', '-'));
?>
";
        <? if (is_object($GLOBALS['perm']) && $GLOBALS['perm']->have_perm('autor') && PersonalNotifications::isActivated()) : ?>
        STUDIP.jsupdate_enable = true;
        <? endif ?>
        STUDIP.URLHelper.parameters = <?php 
echo json_encode(studip_utf8encode(URLHelper::getLinkParams()));
?>
;
    </script>
    <?php 
// needs to be included in lib/include/html_head.inc.php as well
include 'app/views/WysiwygHtmlHead.php';
?>
</head>

<body id="<?php 
echo $body_id ? $body_id : PageLayout::getBodyElementId();
?>
">
<div id="layout_wrapper">
    <? SkipLinks::insertContainer() ?>