Exemple #1
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';
     }
 }
Exemple #2
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);
 }
Exemple #3
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);
 }
Exemple #4
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');
 }
Exemple #5
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');
 }
Exemple #6
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');
 }
Exemple #7
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');
 }
Exemple #8
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');
 }
Exemple #9
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
  * @throws AccessDeniedException if the calendar is not globally enabled
  */
 public function before_filter(&$action, &$args)
 {
     if (!get_config('CALENDAR_ENABLE')) {
         throw new AccessDeniedException(_('Der Kalender ist nicht aktiviert.'));
     }
     parent::before_filter($action, $args);
     PageLayout::setHelpKeyword('Basis.MyStudIPTerminkalender');
     PageLayout::setTitle(_('Einstellungen des Terminkalenders anpassen'));
     Navigation::activateItem('/profile/settings/calendar_new');
     SkipLinks::addIndex(_('Einstellungen des Terminkalenders anpassen'), 'main_content', 100);
 }
Exemple #10
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
  * @throws AccessDeniedException if the current user is not allowed to
  *                               change the password
  */
 public function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     if (!$this->shallChange('auth_user_md5.password', 'password')) {
         throw new AccessDeniedException();
     }
     PageLayout::setHelpKeyword('Basis.HomepagePersönlicheDaten');
     PageLayout::setTitle(_('Passwort ändern'));
     Navigation::activateItem('profile/edit/password');
     SkipLinks::addIndex(_('Passwort ändern'), 'layout_content');
 }
Exemple #11
0
 /**
  * Set up this controller. Rewrites $action on verification.
  *
  * @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);
     Navigation::activateItem('/profile/categories');
     PageLayout::setHelpKeyword('Basis.HomepageSonstiges');
     PageLayout::setTitle(_('Eigene Kategorien bearbeiten'));
     SkipLinks::addIndex(_('Eigene Kategorien bearbeiten'), 'layout_content', 100);
     if ($action === 'verify') {
         $action = 'index';
     }
 }
Exemple #12
0
 public function before_filter(&$action, &$args)
 {
     if ($action === 'verify') {
         $action = 'index';
     }
     parent::before_filter($action, $args);
     PageLayout::setHelpKeyword('Basis.MyStudIPMessaging');
     PageLayout::setTitle(_('Einstellungen des Nachrichtensystems anpassen'));
     Navigation::activateItem('/profile/settings/messaging');
     SkipLinks::addIndex(_('Einstellungen des Nachrichtensystems anpassen'), 'layout_content', 100);
     $this->settings = $this->config->MESSAGING_SETTINGS;
 }
Exemple #13
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.HomepageBild');
     PageLayout::setTitle(_('Hochladen eines persönlichen Bildes'));
     Navigation::activateItem('/profile/avatar');
     SkipLinks::addIndex(_('Hochladen eines persönlichen Bildes'), 'edit_avatar');
     $this->customized = Avatar::getAvatar($this->user->user_id)->is_customized();
     if ($this->customized) {
         SkipLinks::addIndex(_('Eigenes Bild löschen'), 'delete_picture');
     }
 }
Exemple #14
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);
     if (!in_array($this->user->perms, words('autor tutor dozent'))) {
         throw new AccessDeniedException();
     }
     PageLayout::setHelpKeyword('Basis.HomepageUniversitäreDaten');
     PageLayout::setTitle(_('Studiengang bearbeiten'));
     Navigation::activateItem('/profile/edit/studies');
     SkipLinks::addIndex(_('Fächer und Abschlüsse auswählen'), 'select_fach_abschluss');
     SkipLinks::addIndex(_('Zu Einrichtungen zuordnen'), 'select_institute');
     $this->allow_change = array('sg' => !StudipAuthAbstract::CheckField('studiengang_id', $this->user->auth_plugin) && (Config::get()->ALLOW_SELFASSIGN_STUDYCOURSE || $GLOBALS['perm']->have_perm('admin')), 'in' => Config::get()->ALLOW_SELFASSIGN_INSTITUTE || $GLOBALS['perm']->have_perm('admin'));
 }
Exemple #15
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)
 {
     if ($action === 'verify') {
         $action = 'index';
     }
     parent::before_filter($action, $args);
     require_once 'lib/statusgruppe.inc.php';
     PageLayout::setHelpKeyword('Basis.HomepageUniversitäreDaten');
     PageLayout::setTitle(_('Einrichtungsdaten bearbeiten'));
     Navigation::activateItem('/profile/edit/statusgruppen');
     SkipLinks::addIndex(_('Einrichtungsdaten bearbeiten'), 'layout_content', 100);
     Sidebar::get()->setImage('sidebar/group-sidebar.png');
 }
Exemple #16
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
  * @throws AccessDeniedException if notifications are not globally enabled
  *                               or if the user has no access to these
  *                               notifications (admin or root accounts).
  */
 public function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     if (!get_config('MAIL_NOTIFICATION_ENABLE')) {
         $message = _('Die Benachrichtigungsfunktion wurde in den Systemeinstellungen nicht freigeschaltet.');
         throw new AccessDeniedException($message);
     }
     if (!$GLOBALS['auth']->is_authenticated() || $GLOBALS['perm']->have_perm('admin')) {
         throw new AccessDeniedException();
     }
     PageLayout::setHelpKeyword('Basis.MyStudIPBenachrichtigung');
     PageLayout::setTitle(_('Benachrichtigung über neue Inhalte anpassen'));
     Navigation::activateItem('/profile/settings/notification');
     SkipLinks::addIndex(_('Benachrichtigung über neue Inhalte anpassen'), 'layout_content', 100);
     Sidebar::get()->setImage('sidebar/seminar-sidebar.png');
 }
Exemple #17
0
 /**
  * Sets up the controller
  *
  * @param String $action Which action shall be invoked
  * @param Array $args Arguments passed to the action method
  */
 function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     PageLayout::setHelpKeyword('Basis.InteraktionWhosOnline');
     PageLayout::setTitle(_('Wer ist online?'));
     Navigation::activateItem('/community/online');
     SkipLinks::addIndex(_('Wer ist online?'), 'layout_content', 100);
     $this->set_layout($GLOBALS['template_factory']->open('layouts/base'));
     $this->settings = $GLOBALS['user']->cfg->MESSAGING_SETTINGS;
     // If "show_groups" setting is not set, default it to whether the
     // user has organized his buddies in groups
     if (!isset($this->settings['show_groups'])) {
         $query = "SELECT 1 FROM statusgruppen WHERE range_id = ?";
         $statement = DBManager::get()->prepare($query);
         $statement->execute(array($GLOBALS['user']->id));
         $has_contact_groups = $statement->fetchColumn();
         $this->settings['show_groups'] = $has_contact_groups;
     }
 }
Exemple #18
0
 function before_filter(&$action, &$args)
 {
     global $SEM_TYPE, $SEM_CLASS;
     parent::before_filter($action, $args);
     checkObject();
     $this->course = Course::findCurrent();
     if (!$this->course) {
         throw new CheckObjectException(_('Sie haben kein Objekt gewählt.'));
     }
     $this->course_id = $this->course->id;
     PageLayout::setHelpKeyword("Basis.InVeranstaltungKurzinfo");
     PageLayout::setTitle($GLOBALS['SessSemName']["header_line"] . " - " . _("Kurzinfo"));
     Navigation::activateItem('/course/main/info');
     // add skip link
     SkipLinks::addIndex(Navigation::getItem('/course/main/info')->getTitle(), 'main_content', 100);
     $this->sem = Seminar::getInstance($this->course_id);
     $sem_class = $this->sem->getSemClass();
     $this->studygroup_mode = $sem_class["studygroup_mode"];
 }
Exemple #19
0
<? endif ?>

<? if (empty($institutes)) : ?>
    <? if (!Config::get()->ALLOW_SELFASSIGN_INSTITUTE || $GLOBALS['perm']->have_perm("dozent")) : ?>
        <?php 
echo MessageBox::info(sprintf(_('Sie wurden noch keinen Einrichtungen zugeordnet. Bitte wenden Sie sich an einen der zuständigen %sAdministratoren%s.'), '<a href="' . URLHelper::getLink('dispatch.php/siteinfo/show') . '">', '</a>'));
?>
    <? else : ?>
        <?php 
echo MessageBox::info(sprintf(_('Sie haben sich noch keinen Einrichtungen zugeordnet.
           Um sich Einrichtungen zuzuordnen, nutzen Sie bitte die entsprechende %sOption%s unter "Nutzerdaten - Studiendaten"
           auf Ihrer persönlichen Einstellungsseite.'), '<a href="' . URLHelper::getLink('dispatch.php/settings/studies#einrichtungen') . '">', '</a>'));
?>
    <? endif ?>
<? else : ?>
    <? SkipLinks::addIndex(_('Meine Einrichtungen'), 'my_institutes') ?>
    <table class="default" id="my_institutes">
        <caption><?php 
echo _('Meine Einrichtungen');
?>
</caption>
        <colgroup>
            <col width="10px">
            <col width="25px">
            <col>
            <col width="<?php 
echo $nav_elements * 27;
?>
px">
            <col width="45px">
        </colgroup>
Exemple #20
0
<? use Studip\Button, Studip\LinkButton; ?>
<?
if ($inst_id != '' && $inst_id != '0') {
    // add skip links
    SkipLinks::addIndex(_("Mitarbeiterliste"), 'list_institute_members');
    ?>
    <table class="default" id="list_institute_members" border="0" width="99%" cellpadding="0" cellspacing="0"
           align="center">
        <caption><?php 
echo _('Mitarbeiterinnen und Mitarbeiter');
?>
</caption>
        <colgroup>
            <?
            foreach ($table_structure as $key => $field) {
                if ($key != 'statusgruppe') {
                    printf("<col width=\"%s\">", $field["width"]);
                }
            }
            ?>
        </colgroup>
        <thead>
        <tr>
            <?
            $begin = TRUE;
            foreach ($table_structure as $key => $field) {
                if ($begin) {
                    printf("<th width=\"%s\">", $field["width"]);
                    $begin = FALSE;
                } else
                    printf("<th width=\"%s\" align=\"left\" valign=\"bottom\" " . ($key == 'nachricht' ? 'colspan="2"' : '') . ">", $field["width"]);
Exemple #21
0
function form($refresh = FALSE)
{
    global $UPLOAD_TYPES,$range_id,$SessSemName,$user,$folder_system_data;

    $sem_status = $GLOBALS['perm']->get_studip_perm($SessSemName[1]);

    // add skip link (position in list is one before main content => 99)
    SkipLinks::addIndex(_("Datei hochladen"), 'upload_form', 99);

    //erlaubte Dateigroesse aus Regelliste der Config.inc.php auslesen
    if ($UPLOAD_TYPES[$SessSemName["art_num"]]) {
        $max_filesize=$UPLOAD_TYPES[$SessSemName["art_num"]]["file_sizes"][$sem_status];
    }   else {
        $max_filesize=$UPLOAD_TYPES["default"]["file_sizes"][$sem_status];
    }
    $c=1;
    $print = "";
    $print.= "\n<form enctype=\"multipart/form-data\" name=\"upload_form\" action=\"" . URLHelper::getLink('#anker') . "\" method=\"post\">";
    $print.= "\n<input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"".(ini_get('upload_max_filesize')*1048576)."\" />";
    $print.= CSRFProtection::tokenTag();
    if ($folder_system_data['zipupload'])
        $print.="\n<br><br>" . _("Sie haben diesen Ordner zum Upload ausgewählt:")
            . '<br>' . _("Die Dateien und Ordner, die im hochzuladenden Ziparchiv enthalten sind, werden in diesen Ordner entpackt.") .  "<br><br><center><table width=\"90%\" style=\"border: 1px solid #000000;\" border=0 cellpadding=2 cellspacing=3 id=\"upload_form\">";
    else if (!$refresh)
        $print.="\n<br><br>" . _("Sie haben diesen Ordner zum Upload ausgewählt:") . "<br><br><center><table width=\"90%\" style=\"border: 1px solid #000000;\" border=0 cellpadding=2 cellspacing=3 id=\"upload_form\">";
    else
        $print .= "\n<br><br>" . _("Sie haben diese Datei zum Aktualisieren ausgewählt. Sie <b>überschreiben</b> damit die vorhandene Datei durch eine neue Version!") . "<br><br><center><table width=\"90%\" style=\"border: 1px solid #000000;\" border=0 cellpadding=2 cellspacing=3 id=\"upload_form\">";
    $print.="\n";
    $print.="\n<tr><td class=\"table_row_even\" width=\"20%\"><font size=-1><b>";

    //erlaubte Upload-Typen aus Regelliste der Config.inc.php auslesen
    if (!$folder_system_data['zipupload']) {
        if ($UPLOAD_TYPES[$SessSemName["art_num"]]) {
            if ($UPLOAD_TYPES[$SessSemName["art_num"]]["type"] == "allow") {
                $i=1;
                $print.= _("Unzulässige Dateitypen:") . "</b><font></td><td class=\"table_row_even\" width=\"80%\"><font size=-1>";
                foreach ($UPLOAD_TYPES[$SessSemName["art_num"]]["file_types"] as $ft) {
                    if ($i !=1)
                        $print.= ", ";
                    $print.= strtoupper ($ft);
                    $i++;
                    }
                }
            else {
                $i=1;
                $print.= _("Zulässige Dateitypen:") . "</b><font></td><td class=\"table_row_even\" width=\"80%\"><font size=-1>";
                foreach ($UPLOAD_TYPES[$SessSemName["art_num"]]["file_types"] as $ft) {
                    if ($i !=1)
                        $print.= ", ";
                    $print.= strtoupper ($ft);
                    $i++;
                    }
                }
            }
        else {
            if ($UPLOAD_TYPES["default"]["type"] == "allow") {
                $i=1;
                $print.= _("Unzulässige Dateitypen:") . "</b><font></td><td class=\"table_row_even\" width=\"80%\"><font size=-1>";
                foreach ($UPLOAD_TYPES["default"]["file_types"] as $ft) {
                    if ($i !=1)
                        $print.= ", ";
                    $print.= strtoupper ($ft);
                    $i++;
                    }
                }
            else {
                $i=1;
                $print.= _("Zulässige Dateitypen:") . "</b></td><font><td class=\"table_row_even\" width=\"80%\"><font size=-1>";
                foreach ($UPLOAD_TYPES["default"]["file_types"] as $ft) {
                    if ($i !=1)
                        $print.= ", ";
                    $print.= strtoupper ($ft);
                    $i++;
                    }
                }
            }
    } else {
        $print.= _("Zulässige Dateitypen:") . "</b></td><font><td class=\"table_row_even\" width=\"80%\"><font size=-1>";
        $print .= 'ZIP';
    }
    $print.="</font></td></tr>";
    $print.="\n<tr><td class=\"table_row_even\" width=\"20%\"><font size=-1><b>" . _("Maximale Größe:") . "</b></font></td><td class=\"table_row_even\" width=\"80%\"><font size=-1><b>".($max_filesize / 1048576)." </b>" . _("Megabyte") . "</font></td></tr>";
    if ($folder_system_data['zipupload']) {
        $print.="\n<tr><td class=\"table_row_even\" width=\"20%\"><font size=-1><b>" . _("Maximaler Inhalt des Ziparchivs:")
            . "</b></font></td><td class=\"table_row_even\" width=\"80%\"><font size=-1>"
            . sprintf(_("<b>%d</b> Dateien und <b>%d</b> Ordner"),get_config('ZIP_UPLOAD_MAX_FILES'), get_config('ZIP_UPLOAD_MAX_DIRS'))
            . "</font></td></tr>";
    }
    $print.= "<tr><td class=\"content_seperator\" colspan=2><font size=-1>" . _("1. Klicken Sie auf <b>'Durchsuchen...'</b>, um eine Datei auszuwählen.") . " </font></td></tr>";
    $print.= "\n<tr>";
    $print.= "\n<td class=\"table_row_even\" colspan=2 align=\"left\" valign=\"center\"><font size=-1>&nbsp;<label for=\"the_file\">" . _("Dateipfad:") . "</label>&nbsp;</font><br>";
    $print.= "&nbsp;<input name=\"the_file\" id=\"the_file\" aria-required=\"true\" type=\"file\"  style=\"width: 70%\" size=\"30\">&nbsp;</td></td>";
    $print.= "\n</tr>";
    if (!$refresh && !$folder_system_data['zipupload']) {
        $print.= "<tr><td class=\"content_seperator\" colspan=2><font size=-1>" . _("2. Schutz gemäß Urheberrecht.") . "</font></td></tr>";
        $print.= "\n<tr><td class=\"table_row_even\" colspan=2 align=\"left\" valign=\"center\"><font size=-1>";
        $print.= "\n&nbsp;<label><input type=\"RADIO\" name=\"protected\" value=\"0\"".(!$protect ? "checked" :"") .'>'._("Ja, dieses Dokument ist frei von Rechten Dritter") ;
        $print.= "</label>\n&nbsp;<label><input type=\"RADIO\" name=\"protected\" value=\"1\"".($protect ? "checked" :"") .'>'._("Nein, dieses Dokument ist <u>nicht</u> frei von Rechten Dritter");
        $print.= "</label></td></tr>";

        $print.= "<tr><td class=\"content_seperator\" colspan=2><font size=-1>" . _("3. Geben Sie eine kurze Beschreibung und einen Namen für die Datei ein.") . "</font></td></tr>";
        $print.= "\n<tr><td class=\"table_row_even\" colspan=2 align=\"left\" valign=\"center\"><label><font size=-1>&nbsp;" . _("Name:") . "&nbsp;</font><br>";
        $print.= "\n&nbsp;<input type=\"TEXT\" name=\"name\" style=\"width: 70%\" size=\"40\" maxlength\"255\"></label></td></tr>";
        $print.= "\n<tr><td class=\"table_row_even\" colspan=2 align=\"left\" valign=\"center\"><label><font size=-1>&nbsp;" . _("Beschreibung:") . "&nbsp;</font><br>";
        $print.= "\n&nbsp;<textarea name=\"description\" style=\"width: 70%\" COLS=40 ROWS=3 WRAP=PHYSICAL></textarea></label>&nbsp;</td></tr>";
        $print.= "\n<tr><td class=\"content_seperator\" colspan=2 ><font size=-1>" . _("4. Klicken Sie auf <b>'Absenden'</b>, um die Datei hochzuladen") . "</font></td></tr>";
    } else if ($folder_system_data['zipupload']) {
        $print.= "\n<tr><td class=\"content_seperator\" colspan=2 ><font size=-1>" . _("3. Klicken Sie auf <b>'Absenden'</b>, um das Ziparchiv hochzuladen und in diesem Ordner zu entpacken.") . "</font></td></tr>";
    } else {
        $print.= "\n<tr><td class=\"content_seperator\" colspan=2 ><font size=-1>" . _("3. Klicken Sie auf <b>'Absenden'</b>, um die Datei hochzuladen und damit die alte Version zu überschreiben.") . "</font></td></tr>";
    }
    $print.= "\n<tr><td class=\"table_row_even\" colspan=2 align=\"center\" valign=\"center\">";

    $print .= '<div class="button-group">';
    $print .= Button::createAccept(_("Absenden"), "create", array('onClick' => 'return STUDIP.OldUpload.upload_start(jQuery(this).closest("form"));'));
    $print .= LinkButton::createCancel(_("Abbrechen"), URLHelper::getURL("?cancel_x=true#anker"));
    $print .= '</div>';

    $print.="</td></tr>";

    $print.= "\n<input type=\"hidden\" name=\"cmd\" value=\"upload\">";
    $print.= "\n<input type=\"hidden\" name=\"upload_seminar_id\" value=\"".$SessSemName[1]."\">";
    $print.= "\n</table></form><br></center>";

    return $print;
}
Exemple #22
0
<? if (isset($flash['decline_course'])) : ?>
    <?php 
echo createQuestion($flash['message'], array('cmd' => $flash['cmd'], 'studipticket' => $flash['studipticket']), array('cmd' => 'back', 'studipticket' => $flash['studipticket']), $controller->url_for(sprintf('my_courses/decline/%s', $flash['course_id'])));
?>
<? endif ?>

<? if (sizeof($waiting_list)) : ?>
    <?php 
echo $this->render_partial('my_courses/waiting_list.php', compact('waiting_list'));
?>
<? endif ?>


<? if (!empty($sem_courses)) : ?>
    <? $_order = (!$order_by || $order == 'desc') ? 'asc' : 'desc' ?>
    <? SkipLinks::addIndex(_("Meine Veranstaltungen"), 'my_seminars') ?>
    <div id="my_seminars">
        <? foreach ($sem_courses as $sem_key => $course_group) : ?>
            <table class="default collapsable">
                <caption>
                    <?php 
echo htmlReady($sem_data[$sem_key]['name']);
?>
                </caption>
                <colgroup>
                    <col width="7px">
                    <col width="25px">
                    <? if ($config_sem_number) : ?>
                        <col width="10%">
                    <? endif ?>
                    <col>
Exemple #23
0
<?
use Studip\Button, Studip\LinkButton;
SkipLinks::addIndex(_('Termine importieren'), 'main_content', 100);
?>
<form action="<?php 
echo $controller->url_for('calendar/single/import/' . $calendar->getRangeId(), array('atime' => $atime, 'last_view' => $last_view));
?>
" method="post" enctype="multipart/form-data">
    <table class="default" id="main_content">
        <caption>
            <?php 
echo sprintf(_('Termine importieren'));
?>
        </caption>
        <colgroup>
            <col width="25%">
            <col>
            <col width="60px">
        </colgroup>
        <tbody>
            <tr class="header-row">
                <th colspan="3" class="toggle-indicator">
                    <a class="toggler"><?php 
echo _('Einstellungen');
?>
</a>
                </th>
            </tr>
            <tr>
                <td>
                    <label for="event-type">
Exemple #24
0
 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']));
         }
     }
 }
Exemple #25
0
<div id="flex-header">

    <!-- Stud.IP Logo --> 

    <div id="header">
        <!--<div id="barTopFont"> 
                <?php 
echo htmlReady($GLOBALS['UNI_NAME_CLEAN']);
?>
 
            </div> 
         -->

        
        <? SkipLinks::addIndex(_("Hauptnavigation"), 'barTopMenu', 1); ?>
        <ul id="barTopMenu" role="navigation">
        <? $accesskey = 0 ?>
        <? foreach (Navigation::getItem('/') as $path => $nav) : ?>
            <? if ($nav->isVisible(true)) : ?>
                <?
                $accesskey_attr = '';
                $image = $nav->getImage();

                if ($accesskey_enabled) {
                    $accesskey = ++$accesskey % 10;
                    $accesskey_attr = 'accesskey="' . $accesskey . '"';
                    $image['title'] .= "  [ALT] + $accesskey";
                }

                ?>
Exemple #26
0
                                                        //
                                                        // Delete all was confirmed -> delete entire page
                                                        //
                                                        $keyword = deleteAllWikiPage($keyword, $SessSemName[1]);
                                                        $version = "";
                                                        // show latest version
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                                //
                                // Show Page
                                //
                                SkipLinks::addIndex(_("Aktuelle Seite"), 'main_content', 100);
                                showWikiPage($keyword, $version, $special, $show_wiki_comments, Request::get('hilight'));
                            }
                        }
                    }
                }
            }
        }
    }
}
// end default action
$layout = $GLOBALS['template_factory']->open('layouts/base');
$layout->content_for_layout = ob_get_clean();
if (in_array($cmd, words('show abortedit really_delete really_delete_all'))) {
    // redirect to normal view to avoid duplicate edits on reload or back/forward
    header('Location: ' . URLHelper::getURL('', compact('keyword')));
Exemple #27
0
<? use Studip\Button, Studip\LinkButton; ?>
<? if (Request::isXhr()) : ?>
    <? foreach (PageLayout::getMessages() as $messagebox) : ?>
        <?php 
echo $messagebox;
?>
    <? endforeach ?>
<? else : ?>
    <? SkipLinks::addIndex(_("Termine anlegen/bearbeiten"), 'main_content', 100); ?>
<? endif; ?>
<form data-dialog="" method="post" action="<?php 
echo $controller->url_for($base . 'edit/' . $range_id . '/' . $event->event_id);
?>
">
<?php 
echo CSRFProtection::tokenTag();
?>
    <table class="default collapsable nohover" id="main_content">
        <caption class="hide-in-dialog">
            <? if ($event->isNew()) : ?>
            <?php 
echo sprintf(_('Neuen Termin anlegen am %s'), strftime('%x', $event->getStart()));
?>
            <? else : ?>
            <?php 
echo _('Termin bearbeiten');
?>
            <? endif; ?>
        </caption>
        <colgroup>
            <col width="25%">
Exemple #28
0
<?
// add skip link
SkipLinks::addIndex(_("Tagesansicht"), 'main_content', 100);
?>
<div style="width: 100%; display: flex; flex-wrap: wrap;">
    <div style="flex-grow:2; flex-basis: 60%;">
        <?php 
echo $this->render_partial('calendar/single/_day');
?>
    </div>
    <div style="flex-grow:1; padding-left:1em;">
        <? $imt = Request::int('imt', mktime(12, 0, 0, date('n', $atime) - 1, date('j', $atime), date('Y', $atime))) ?>
        <?php 
echo $this->render_partial('calendar/single/_include_month', array('imt' => $imt, 'href' => ''));
?>
        <? $imt = mktime(12, 0, 0, date('n', $imt) + 1, date('j', $imt), date('Y', $imt)) ?>
        <?php 
echo $this->render_partial('calendar/single/_include_month', array('imt' => $imt, 'href' => '', 'mod' => 'NONAVARROWS'));
?>
        <? $imt = mktime(12, 0, 0, date('n', $imt) + 1, date('j', $imt), date('Y', $imt)) ?>
        <?php 
echo $this->render_partial('calendar/single/_include_month', array('imt' => $imt, 'href' => '', 'mod' => 'NONAVARROWS'));
?>
    </div>
</div>
Exemple #29
0
 public function index_action()
 {
     global $perm, $PATH_EXPORT;
     $sem = Seminar::getInstance($this->course_id);
     // old message style
     if ($_SESSION['sms_msg']) {
         $this->msg = $_SESSION['sms_msg'];
         unset($_SESSION['sms_msg']);
     }
     $this->sort_by = Request::option('sortby', 'nachname');
     $this->order = Request::option('order', 'desc');
     $this->sort_status = Request::get('sort_status');
     Navigation::activateItem('/course/members/view');
     if (Request::int('toggle')) {
         $this->order = $this->order == 'desc' ? 'asc' : 'desc';
     }
     $filtered_members = $this->members->getMembers($this->sort_status, $this->sort_by . ' ' . $this->order, !$this->is_tutor ? $this->user_id : null);
     if ($this->is_tutor) {
         $filtered_members = array_merge($filtered_members, $this->members->getAdmissionMembers($this->sort_status, $this->sort_by . ' ' . $this->order));
         $this->awaiting = $filtered_members['awaiting']->toArray('user_id username vorname nachname visible mkdate');
         $this->accepted = $filtered_members['accepted']->toArray('user_id username vorname nachname visible mkdate');
         $this->claiming = $filtered_members['claiming']->toArray('user_id username vorname nachname visible mkdate');
     }
     // Check autor-perms
     if (!$this->is_tutor) {
         SkipLinks::addIndex(_("Sichtbarkeit ändern"), 'change_visibility');
         // filter invisible user
         $this->invisibles = count($filtered_members['autor']->findBy('visible', 'no')) + count($filtered_members['user']->findBy('visible', 'no'));
         $current_user_id = $this->user_id;
         $exclude_invisibles = function ($user) use($current_user_id) {
             return $user['visible'] != 'no' || $user['user_id'] == $current_user_id;
         };
         $filtered_members['autor'] = $filtered_members['autor']->filter($exclude_invisibles);
         $filtered_members['user'] = $filtered_members['user']->filter($exclude_invisibles);
         $this->my_visibility = $this->getUserVisibility();
         if (!$this->my_visibility['iam_visible']) {
             $this->invisibles--;
         }
     }
     // get member informations
     $this->dozenten = $filtered_members['dozent']->toArray('user_id username vorname nachname');
     $this->tutoren = $filtered_members['tutor']->toArray('user_id username vorname nachname mkdate');
     $this->autoren = $filtered_members['autor']->toArray('user_id username vorname nachname visible mkdate');
     $this->users = $filtered_members['user']->toArray('user_id username vorname nachname visible mkdate');
     $this->studipticket = Seminar_Session::get_ticket();
     $this->subject = $this->getSubject();
     $this->groups = $this->status_groups;
     // Check Seminar
     if ($this->is_tutor && $sem->isAdmissionEnabled()) {
         $this->course = $sem;
         $distribution_time = $sem->getCourseSet()->getSeatDistributionTime();
         if ($sem->getCourseSet()->hasAlgorithmRun()) {
             $this->waitingTitle = _("Warteliste");
             if (!$sem->admission_disable_waitlist_move) {
                 $this->waitingTitle .= ' (' . _("automatisches Nachrücken ist eingeschaltet") . ')';
             } else {
                 $this->waitingTitle .= ' (' . _("automatisches Nachrücken ist ausgeschaltet") . ')';
             }
             $this->semAdmissionEnabled = 2;
             $this->waiting_type = 'awaiting';
         } else {
             $this->waitingTitle = sprintf(_("Anmeldeliste (Losverfahren am %s)"), strftime('%x %R', $distribution_time));
             $this->semAdmissionEnabled = 1;
             $this->awaiting = $this->claiming;
             $this->waiting_type = 'claiming';
         }
     }
     // Set the infobox
     $this->createSidebar($filtered_members, $course);
     if ($this->is_locked && $this->is_tutor) {
         $lockdata = LockRules::getObjectRule($this->course_id);
         if ($lockdata['description']) {
             PageLayout::postMessage(MessageBox::info(formatLinks($lockdata['description'])));
         }
     }
     // Check for waitlist availability (influences available actions)
     // People can be moved to waitlist if waitlist available and no automatic moving up.
     if (!$sem->admission_disable_waitlist && $sem->admission_disable_waitlist_move) {
         $this->to_waitlist_actions = true;
     }
 }
Exemple #30
0
 /**
  * Overview for achived courses
  * TODO: Caching?
  */
 public function archive_action()
 {
     if ($GLOBALS['perm']->have_perm('admin')) {
         throw new AccessDeniedException();
     }
     PageLayout::setTitle(_('Meine archivierten Veranstaltungen'));
     PageLayout::setHelpKeyword('Basis.MeinArchiv');
     Navigation::activateItem('/browse/my_courses/archive');
     SkipLinks::addIndex(_('Hauptinhalt'), 'layout_content', 100);
     $sortby = Request::option('sortby', 'name');
     $query = "SELECT semester, name, seminar_id, status, archiv_file_id,\n                         LENGTH(forumdump) > 0 AS forumdump, # Test for existence\n                         LENGTH(wikidump) > 0 AS wikidump    # Test for existence\n                  FROM archiv_user\n                  LEFT JOIN archiv USING (seminar_id)\n                  WHERE user_id = :user_id\n                  GROUP BY seminar_id\n                  ORDER BY start_time DESC, :sortby";
     $statement = DBManager::get()->prepare($query);
     $statement->bindValue(':user_id', $GLOBALS['user']->id);
     $statement->bindValue(':sortby', $sortby, StudipPDO::PARAM_COLUMN);
     $statement->execute();
     $this->seminars = $statement->fetchAll(PDO::FETCH_GROUP | PDO::FETCH_ASSOC);
     // Groups by semester
 }