public function index_action() { if (Request::isPost() && Request::option("termin_id") && Request::get("topic_title")) { $date = new CourseDate(Request::option("termin_id")); $seminar_id = $date['range_id']; $title = Request::get("topic_title"); $topic = CourseTopic::findByTitle($seminar_id, $title); if (!$topic) { $topic = new CourseTopic(); $topic['title'] = $title; $topic['seminar_id'] = $seminar_id; $topic['author_id'] = $GLOBALS['user']->id; $topic['description'] = ""; $topic->store(); } $success = $date->addTopic($topic); if ($success) { PageLayout::postMessage(MessageBox::success(_("Thema wurde hinzugefügt."))); } else { PageLayout::postMessage(MessageBox::info(_("Thema war schon mit dem Termin verknüpft."))); } } Navigation::activateItem('/course/schedule/dates'); object_set_visit_module("schedule"); $this->last_visitdate = object_get_visit(Course::findCurrent()->id, 'schedule'); $this->dates = Course::findCurrent()->getDatesWithExdates(); $this->lecturer_count = Course::findCurrent()->countMembersWithStatus('dozent'); }
/** * **/ public function keys_action($id) { $details = $this->render_keys($id); if (Request::isXhr()) { $this->render_text(implode('<br>', $details)); } else { PageLayout::postMessage(MessageBox::info(_('Die Schlüssel in den Details dieser Meldung sollten vertraulich behandelt werden!'), $details, true)); $this->redirect('admin/api/#' . $id); } }
public function ask_for_hosts_action($host_id) { $host = new LernmarktplatzHost($host_id); $added = $this->askForHosts($host); if ($added > 0) { PageLayout::postMessage(MessageBox::success(sprintf(_("%s neue Server hinzugefügt."), $added))); } else { PageLayout::postMessage(MessageBox::info(_("Keine neuen Server gefunden."))); } $this->redirect("admin/hosts"); }
/** * Returns the Flexi template for entering the necessary values * for this step. * * @param Array $values Pre-set values * @param int $stepnumber which number has the current step in the wizard? * @param String $temp_id temporary ID for wizard workflow * @return String a Flexi template for getting needed data. */ public function getStepTemplate($values, $stepnumber, $temp_id) { // We only need our own stored values here. $values = $values[__CLASS__]; // Load template from step template directory. $factory = new Flexi_TemplateFactory($GLOBALS['STUDIP_BASE_PATH'] . '/app/views/course/wizard/steps'); $tpl = $factory->open('studyareas/index'); if ($values['studyareas']) { $tree = $this->buildPartialSemTree(StudipStudyArea::backwards(StudipStudyArea::findMany($values['studyareas'])), false); $tpl->set_attribute('assigned', $tree); } else { $tpl->set_attribute('assigned', array()); } $tpl->set_attribute('values', $values); // First tree level is always shown. $tree = StudipStudyArea::findByParent(StudipStudyArea::ROOT); if (count($tree) == 0) { PageLayout::postError(formatReady(_('Das Anlegen einer ' . 'Veranstaltung ist nicht möglich, da keine Studienbereiche ' . 'existieren. Bitte wenden Sie sich an [die ' . 'Stud.IP-Administration]' . URLHelper::getLink('dispatch.php/siteinfo/show') . ' .'))); return false; } /* * Someone works without JS activated, load all ancestors and * children of open node. */ if ($values['open_node']) { $tpl->set_attribute('open_nodes', $this->buildPartialSemTree(StudipStudyArea::backwards(StudipStudyArea::findByParent($values['open_node'])), false, true)); } /* * Someone works without JS and has entered a search term: * build the partial tree with search results. */ if ($values['searchterm']) { $search = $this->searchSemTree($values['searchterm'], false, true); if ($search) { $tpl->set_attribute('open_nodes', $search); $tpl->set_attribute('search_result', $search); unset($values['open_node']); } else { PageLayout::postMessage(MessageBox::info(_('Es wurde kein Suchergebnis gefunden.'))); unset($values['searchterm']); } } $tpl->set_attribute('tree', $tree); $tpl->set_attribute('ajax_url', $values['ajax_url'] ?: URLHelper::getLink('dispatch.php/course/wizard/ajax')); $tpl->set_attribute('no_js_url', $values['no_js_url'] ?: 'dispatch.php/course/wizard/forward/' . $stepnumber . '/' . $temp_id); $tpl->set_attribute('stepnumber', $stepnumber); $tpl->set_attribute('temp_id', $temp_id); return $tpl->render(); }
public function overview_action($process_id = null) { $this->process = FleximportProcess::find($process_id); if ($this->process) { foreach ($this->process->tables as $table) { $table->fetchData(); } Navigation::activateItem("/fleximport/process_" . $process_id); $this->tables = $this->process->tables; if ($this->process['description']) { PageLayout::postMessage(MessageBox::info($this->process['description'])); } } else { Navigation::activateItem("/fleximport/overview"); PageLayout::postMessage(MessageBox::info(_("Erstellen Sie erst einen Prozess und dann darin die Tabellen, die importiert werden sollen."))); } }
/** * createEvaluationHeader: generate the head of an evaluation (title and base text) * @param the evaluation * @returns a table row */ function createEvaluationHeader($eval, $votedNow, $votedEarlier) { $br = new HTMpty("br"); $tr = new HTM("tr"); $td = new HTM("td"); $td->attr("class", "table_row_even"); $table2 = new HTM("table"); $table2->attr("width", "100%"); $tr2 = new HTM("tr"); $td2 = new HTM("td"); $td2->attr("width", "90%"); $td2->attr("valign", "top"); if ($eval->isError()) { $td2->html(EvalCommon::createErrorReport($eval, _("Fehler"))); $td2->html($br); } $span = new HTM("span"); $span->attr("class", "eval_title"); $span->html(htmlReady($eval->getTitle())); $td2->cont($span); $td2->cont($br); $td2->cont($br); if ($votedNow) { $message = new HTML('div'); $message->_content = array((string) MessageBox::success(_("Vielen Dank für Ihre Teilnahme."))); $td2->cont($message); } elseif ($votedEarlier) { $message = new HTML('div'); $message->_content = array((string) MessageBox::info(_("Sie haben an dieser Evaluation bereits teilgenommen."))); $td2->cont($message); } else { $td2->html(formatReady($eval->getText())); $td2->cont($br); } $tr2->cont($td2); $td2 = new HTM("td"); $td2->attr("width", "250"); $td2->attr("valign", "top"); $td2->html(EvalShow::createInfoBox($eval, $votedNow || $votedEarlier)); $tr2->cont($td2); $table2->cont($tr2); $td->cont($table2); $tr->cont($td); return $tr; }
/** * Entry point of the controller that displays the start page of Stud.IP * * @param string $action * @param string $widgetId * * @return void */ function index_action($action = false, $widgetId = null) { $this->left = WidgetHelper::getUserWidgets($GLOBALS['user']->id, 0); $this->right = WidgetHelper::getUserWidgets($GLOBALS['user']->id, 1); if (!(count($this->left) + count($this->right))) { WidgetHelper::setInitialPositions(); $this->left = WidgetHelper::getUserWidgets($GLOBALS['user']->id, 0); $this->right = WidgetHelper::getUserWidgets($GLOBALS['user']->id, 1); } WidgetHelper::setActiveWidget(Request::get('activeWidget')); $sidebar = Sidebar::get(); $sidebar->setImage('sidebar/home-sidebar.png'); $sidebar->setTitle(_("Meine Startseite")); $nav = new NavigationWidget(); $nav->setTitle(_('Sprungmarken')); foreach (array_merge($this->left, $this->right) as $widget) { $nav->addLink($widget->getPluginName(), $this->url_for('start#widget-' . $widget->widget_id)); } $sidebar->addWidget($nav); // Show action to add widget only if not all widgets have already been added. $actions = new ActionsWidget(); if (WidgetHelper::getAvailableWidgets($GLOBALS['user']->id)) { $actions->addLink(_('Neues Widget hinzufügen'), $this->url_for('start/add'), Icon::create('add', 'clickable'))->asDialog(); } $actions->addLink(_('Standard wiederherstellen'), $this->url_for('start/reset'), Icon::create('accept', 'clickable')); $sidebar->addWidget($actions); // Root may set initial positions if ($GLOBALS['perm']->have_perm('root')) { $settings = new ActionsWidget(); $settings->setTitle(_('Einstellungen')); $settings->addElement(new WidgetElement(_('Standard-Startseite bearbeiten:'))); foreach ($GLOBALS['perm']->permissions as $permission => $useless) { $settings->addElement(new LinkElement(ucfirst($permission), $this->url_for('start/edit_defaults/' . $permission), Icon::create('link-intern', 'clickable'), array('data-dialog' => ''))); } $sidebar->addWidget($settings); } if ($GLOBALS['perm']->get_perm() == 'user') { PageLayout::postMessage(MessageBox::info(_('Sie haben noch nicht auf Ihre Bestätigungsmail geantwortet.'), array(_('Bitte holen Sie dies nach, um Stud.IP Funktionen wie das Belegen von Veranstaltungen nutzen zu können.'), sprintf(_('Bei Problemen wenden Sie sich an: %s'), '<a href="mailto:' . $GLOBALS['UNI_CONTACT'] . '">' . $GLOBALS['UNI_CONTACT'] . '</a>')))); PageLayout::postMessage(MessageBox::info(sprintf(_('Haben Sie die Bestätigungsmail an Ihre Adresse "%s" nicht erhalten?'), htmlReady($GLOBALS['user']->Email)), array(Studip\LinkButton::create(_('Bestätigungsmail erneut verschicken'), $this->url_for('start/resend_validation_mail')) . ' ' . Studip\LinkButton::create(_('Email-Adresse ändern'), $this->url_for('start/edit_mail_address'), array('data-dialog' => "size=auto", 'title' => _('Email-Adresse')))))); } }
/** * Basic display of the groups */ public function index_action() { $lockrule = LockRules::getObjectRule($_SESSION['SessionSeminar']); $this->is_locked = LockRules::Check($_SESSION['SessionSeminar'], 'groups'); if ($lockrule->description && $this->is_locked) { PageLayout::postMessage(MessageBox::info(formatLinks($lockrule->description))); } // Setup sidebar. $sidebar = Sidebar::get(); $sidebar->setImage('sidebar/group-sidebar.png'); if ($this->tutor) { $widget = new ActionsWidget(); $widget->addLink(_('Neue Gruppe anlegen'), $this->url_for('admin/statusgroups/editGroup'), Icon::create('group3+add', 'clickable'))->asDialog('size=auto'); $widget->addLink(_('Gruppenreihenfolge ändern'), $this->url_for('admin/statusgroups/sortGroups'), Icon::create('arr_2down', 'clickable'))->asDialog(); $sidebar->addWidget($widget); } // Collect all groups $this->loadGroups(); $this->membersOfInstitute = Institute::find($_SESSION['SessionSeminar'])->members->orderBy('nachname')->pluck('user_id'); // Create multiperson search type $query = "SELECT auth_user_md5.user_id, CONCAT({$GLOBALS['_fullname_sql']['full']}, ' (', auth_user_md5.username, ')') as fullname\n FROM auth_user_md5\n LEFT JOIN user_info ON (user_info.user_id = auth_user_md5.user_id)\n WHERE (CONCAT(auth_user_md5.Vorname, ' ', auth_user_md5.Nachname) LIKE :input\n OR auth_user_md5.username LIKE :input)\n AND auth_user_md5.perms IN ('autor', 'tutor', 'dozent')\n AND auth_user_md5.visible <> 'never'\n ORDER BY Vorname, Nachname"; $this->searchType = new SQLSearch($query, _('Teilnehmer suchen'), 'username'); }
" title="<?php echo _('Diese Seite an die erste Position setzen'); ?> "> <?php echo Icon::create('arr_2up', 'clickable')->asImg(); ?> </a> <? endif; ?> <a href="<?php echo $controller->url_for('course/scm/' . $scm->id . '?verify=delete'); ?> " title="<?php echo _('Diese Seite löschen'); ?> "> <?php echo Icon::create('trash', 'clickable')->asImg(); ?> </a> <? endif; ?> <? endif; ?> </nav> </header> <section> <?php echo $scm->content ? formatReady($scm->content) : MessageBox::info(_('In diesem Bereich wurden noch keine Inhalte erstellt.')); ?> </section> </section>
<? # Lifter010: TODO ?> <? if (isset($message)): ?> <?php echo $message; ?> <? endif ?> <? if (count($domains) == 0) : ?> <?php echo MessageBox::info(_('Es sind keine Nutzerdomänen vorhanden.')); ?> <? else : ?> <table class="default"> <caption> <?php echo _('Liste der Nutzerdomänen'); ?> </caption> <?php echo $this->render_partial('admin/domain/domains'); ?> </table> <? endif ?>
<? // TODO: This should be removed when archive_assi uses PageLayout::postMessage() if ($message) parse_msg($message); ?> <? if (empty($seminars)): ?> <?php echo MessageBox::info(_('Es befinden sich zur Zeit keine Veranstaltungen im Archiv, an denen Sie teilgenommen haben.')); ?> <? else: ?> <? foreach ($seminars as $semester => $rows): ?> <table class="default"> <? if ($semester): ?> <caption><?php echo htmlReady($semester); ?> </caption> <? endif; ?> <colgroup> <col width="80%"> <col width="10%"> <col width="10%"> </colgroup> <thead> <tr> <th> <a href="<?php echo $controller->url_for('my_courses/archive?sortby=name'); ?> ">
$query = "UPDATE auth_user_md5 SET perms = 'autor' WHERE user_id = ?"; $statement = DBManager::get()->prepare($query); $statement->execute(array($user->id)); if ($statement->rowCount() == 0) { $error = _('Fehler! Bitte wenden Sie sich an den Systemadministrator.'); $details = array($query); $message = MessageBox::error($error, $details); } else { $success = _('Ihr Status wurde erfolgreich auf <em>autor</em> gesetzt.<br> Damit dürfen Sie in den meisten Veranstaltungen schreiben, für die Sie sich anmelden.'); $details = array(); $details[] = _('Einige Veranstaltungen erfordern allerdings bei der Anmeldung die Eingabe eines Passwortes. Dieses Passwort erfahren Sie von den Lehrenden der Veranstaltung.'); $message = MessageBox::success($success, $details); // Auto-Inserts AutoInsert::instance()->saveUser($user->id, "autor"); $auth->logout(); // einen Logout durchführen, um erneuten Login zu erzwingen $info = sprintf(_('Die Statusänderung wird erst nach einem erneuten %sLogin%s wirksam!<br> Deshalb wurden Sie jetzt automatisch ausgeloggt.'), '<a href="index.php?again=yes"><em>', '</em></a>'); $message .= MessageBox::info($info); } } } } } $template = $GLOBALS['template_factory']->open('email-validation'); $template->set_layout($GLOBALS['template_factory']->open('layouts/base_without_infobox')); $template->message = $message; echo $template->render(); page_close();
/** * This action remove a user from course * @param $course_id */ public function decline_action($course_id, $waiting = null) { $current_seminar = Seminar::getInstance($course_id); $ticket_check = Seminar_Session::check_ticket(Request::option('studipticket')); if (LockRules::Check($course_id, 'participants')) { $lockdata = LockRules::getObjectRule($course_id); PageLayout::postMessage(MessageBox::error(sprintf(_("Sie können sich nicht von der Veranstaltung <b>%s</b> abmelden."), htmlReady($current_seminar->name)))); if ($lockdata['description']) { PageLayout::postMessage(MessageBox::info(formatLinks($lockdata['description']))); } $this->redirect('my_courses/index'); return; } if (Request::option('cmd') == 'back') { $this->redirect('my_courses/index'); return; } if (Request::option('cmd') != 'kill' && Request::option('cmd') != 'kill_admission') { if ($current_seminar->admission_binding && Request::get('cmd') != 'suppose_to_kill_admission' && !LockRules::Check($current_seminar->getId(), 'participants')) { PageLayout::postMessage(MessageBox::error(sprintf(_("Die Veranstaltung <b>%s</b> ist als <b>bindend</b> angelegt.\n Wenn Sie sich abmelden wollen, müssen Sie sich an die Lehrende der Veranstaltung wenden."), htmlReady($current_seminar->name)))); $this->redirect('my_courses/index'); return; } if (Request::get('cmd') == 'suppose_to_kill') { // check course admission list(, $admission_end_time) = @array_values($current_seminar->getAdmissionTimeFrame()); $admission_enabled = $current_seminar->isAdmissionEnabled(); $admission_locked = $current_seminar->isAdmissionLocked(); if ($admission_enabled || $admission_locked || (int) $current_seminar->admission_prelim == 1) { $message = sprintf(_('Wollen Sie sich von der teilnahmebeschränkten Veranstaltung "%s" wirklich abmelden? Sie verlieren damit die Berechtigung für die Veranstaltung und müssen sich ggf. neu anmelden!'), $current_seminar->name); } else { if (isset($admission_end_time) && $admission_end_time < time()) { $message = sprintf(_('Wollen Sie sich von der teilnahmebeschränkten Veranstaltung "%s" wirklich abmelden? Der Anmeldzeitraum ist abgelaufen und Sie können sich nicht wieder anmelden!'), $current_seminar->name); } else { $message = sprintf(_('Wollen Sie sich von der Veranstaltung "%s" wirklich abmelden?'), $current_seminar->name); } } $this->flash['cmd'] = 'kill'; } else { if (admission_seminar_user_get_position($GLOBALS['user']->id, $course_id) === false) { $message = sprintf(_('Wollen Sie sich von der Anmeldeliste der Veranstaltung "%s" wirklich abmelden?'), $current_seminar->name); } else { $message = sprintf(_('Wollen Sie sich von der Warteliste der Veranstaltung "%s" wirklich abmelden? Sie verlieren damit die bereits erreichte Position und müssen sich ggf. neu anmelden!'), $current_seminar->name); } $this->flash['cmd'] = 'kill_admission'; } $this->flash['decline_course'] = true; $this->flash['course_id'] = $course_id; $this->flash['message'] = $message; $this->flash['studipticket'] = Seminar_Session::get_ticket(); $this->redirect('my_courses/index'); return; } else { if (!LockRules::Check($course_id, 'participants') && $ticket_check && Request::option('cmd') != 'back' && Request::get('cmd') != 'kill_admission') { $query = "DELETE FROM seminar_user WHERE user_id = ? AND Seminar_id = ?"; $statement = DBManager::get()->prepare($query); $statement->execute(array($GLOBALS['user']->id, $course_id)); if ($statement->rowCount() == 0) { PageLayout::postMessage(MessageBox::error(_('In der ausgewählten Veranstaltung wurde die gesuchten Personen nicht gefunden und konnte daher nicht ausgetragen werden.'))); } else { // LOGGING StudipLog::log('SEM_USER_DEL', $course_id, $GLOBALS['user']->id, 'Hat sich selbst ausgetragen'); // enable others to do something after the user has been deleted NotificationCenter::postNotification('UserDidLeaveCourse', $course_id, $GLOBALS['user']->id); // Delete from statusgroups RemovePersonStatusgruppeComplete(get_username(), $course_id); // Are successor available update_admission($course_id); PageLayout::postMessage(MessageBox::success(sprintf(_("Erfolgreich von Veranstaltung <b>%s</b> abgemeldet."), htmlReady($current_seminar->name)))); } } else { // LOGGING StudipLog::log('SEM_USER_DEL', $course_id, $GLOBALS['user']->id, 'Hat sich selbst aus der Warteliste ausgetragen'); if ($current_seminar->isAdmissionEnabled()) { $prio_delete = AdmissionPriority::unsetPriority($current_seminar->getCourseSet()->getId(), $GLOBALS['user']->id, $course_id); } $query = "DELETE FROM admission_seminar_user WHERE user_id = ? AND seminar_id = ?"; $statement = DBManager::get()->prepare($query); $statement->execute(array($GLOBALS['user']->id, $course_id)); if ($statement->rowCount() || $prio_delete) { //Warteliste neu sortieren renumber_admission($course_id); //Pruefen, ob es Nachruecker gibt update_admission($course_id); PageLayout::postMessage(MessageBox::success(sprintf(_("Der Eintrag in der Anmelde- bzw. Warteliste der Veranstaltung <b>%s</b> wurde aufgehoben.\n Wenn Sie an der Veranstaltung teilnehmen wollen, müssen Sie sich erneut bewerben."), htmlReady($current_seminar->name)))); } } $this->redirect('my_courses/index'); return; } }
<?= MessageBox::error(_('Keine Veranstaltungsart für Studiengruppen gefunden'), array(sprintf(_('Die Standardkonfiguration für Studiengruppen in der Datei <b>%s</b> fehlt oder ist unvollständig.'), 'config.inc.php'))) ?> <? endif ?> <? if (!Config::getInstance()->getValue('STUDYGROUPS_ENABLE')):?> <?= MessageBox::info( _("Die Studiengruppen sind derzeit <b>nicht</b> aktiviert.") . '<br>'. _("Zum Aktivieren füllen Sie bitte das Formular aus und klicken Sie auf \"Speichern\".")); ?> <? else: ?> <? if ($can_deactivate) : ?> <?= MessageBox::info( _("Die Studiengruppen sind aktiviert.")) ?> <form action="<?= $controller->url_for('course/studygroup/deactivate') ?>" method="post"> <?= CSRFProtection::tokenTag() ?> <?= Button::create(_("Deaktivieren"), 'deaktivieren') ?> </form> <? else: ?> <?= MessageBox::info(_("Sie können die Studiengruppen nicht deaktivieren, solange noch welche in Stud.IP vorhanden sind!")) ?> <? endif; ?> <br> <?php endif;?> <form action="<?= $controller->url_for('course/studygroup/savemodules') ?>" method="post"> <?= CSRFProtection::tokenTag() ?> <!-- Title --> <table class="default"> <tr> <th colspan="2"> <b><?= _("Einrichtungszuordnung") ?></b> </th> </tr> <tr> <td> <?= _("Alle Studiengruppen werden folgender Einrichtung zugeordnet:") ?><br> </td> <td>
} $problems[$problems_found] = $msgText; $problems_found++; } } if ($problems_found > 1) { $moreProbs = " (Beachten Sie bitte die angegebene Reihenfolge!)"; } if ($problems_found) { ?> <table width="100%" border=0 cellpadding=0 cellspacing=0> <tr> <td class="blank" colspan=2> <?= MessageBox::info(_("Das Anlegen einer Veranstaltung ist leider zu diesem Zeitpunkt noch nicht möglich, da zunächst die folgenden Voraussetzungen geschaffen werden müssen.".$moreProbs), $problems); ?> </td> </tr> <tr <? $cssSw->switchClass() ?>> <td class="<? echo $cssSw->getClass() ?>" align="center" colspan=2> <?= LinkButton::create(_('Aktualisieren'), URLHelper::getURL(''))?> </td> </tr> <tr> <td class="blank" colspan=2> </td> </tr> </table> <?php return false; }
/** * @deprecated since Stud.IP version 1.10 * * @param unknown_type $text * @param unknown_type $colspan */ static function showInfoMessage($text, $colspan = 2) { echo MessageBox::info($text); }
<th><?php echo _("Inhalt"); ?> </th> <th></th> </tr> </thead> <? if (strcmp($group_field, 'sem_number') !== 0) : ?> <?php echo $this->render_partial("my_courses/_group", compact('sem_key', 'course_group')); ?> <? else : ?> <? $course_collection = $course_group ?> <?php echo $this->render_partial("my_courses/_course", compact('course_collection')); ?> <? endif ?> </table> <? endforeach ?> </div> <? else : ?> <?php echo PageLayout::postMessage(MessageBox::info(_('Es wurden keine Veranstaltungen gefunden. Mögliche Ursachen:'), array(sprintf(_('Sie haben zur Zeit keine Veranstaltungen belegt, an denen Sie teilnehmen können.<br>Bitte nutzen Sie %s<b>Veranstaltung suchen / hinzufügen</b>%s um sich für Veranstaltungen anzumelden.'), '<a href="' . URLHelper::getLink('dispatch.php/search/courses') . '">', '</a>'), _('In dem ausgewählten <b>Semester</b> wurden keine Veranstaltungen belegt.') . '<br>' . _('Wählen Sie links im <b>Semesterfilter</b> ein anderes Semester aus')))); ?> <? endif ?> <? if (count($my_bosses)) : ?> <?php echo $this->render_partial('my_courses/_deputy_bosses'); ?> <? endif ?>
$query = "SELECT 1 FROM datafields LEFT JOIN datafields_entries USING (datafield_id) WHERE object_type = 'usersemdata' AND sec_range_id = ? AND range_id = ?"; $statement = DBManager::get()->prepare($query); $statement->execute(array($course_id, $GLOBALS['user']->id)); if (!$statement->fetchColumn()) { $show = true; } break; } } if ($show) { echo MessageBox::info(_("Sie haben noch nicht die für diese Veranstaltung benötigten Zusatzinformationen eingetragen."), array( _('Um das nachzuholen, gehen Sie unter "Teilnehmende" auf "Zusatzangaben"'), _("oder") . ' <a href="' . URLHelper::getLink("dispatch.php/course/members/additional_input") . '"> ' . _("direkt zu den Zusatzangaben") . '</a>' )); } } } } else { echo '<b>'._('Beschreibung:').' </b><br>'. formatLinks($sem->description) .'<br><br>'; echo '<b>'._('Moderiert von:') .'</b> '; $all_mods = $sem->getMembers('dozent') + $sem->getMembers('tutor'); $mods = array(); foreach($all_mods as $mod) { $mods[] = '<a href="'.URLHelper::getLink("dispatch.php/profile?username="******">'.htmlready($mod['fullname']).'</a>'; } echo implode(', ', $mods); echo '<br><br>'; }
/** * Convenience method: Post an info message box. * * @param String $message Info message to diplay * @param Array $details Additional details (optional) * @param bool $close_details Show the details closed (optional, * defaults to false) */ public static function postInfo($message, $details = array(), $close_details = false) { self::postMessage(MessageBox::info($message, $details, $close_details)); }
echo sprintf(_('Zuletzt geändert am %s'), strftime('%x, %X', $scm->chdate)); ?> <? endif; ?> </td> </tr> </thead> <tbody class="content_body"> <tr> <td colspan="2"> <? if (!empty($scm->content)): ?> <?php echo formatReady($scm->content); ?> <? else: ?> <?php echo MessageBox::info(_('In diesem Bereich wurden noch keine Inhalte erstellt.')); ?> <? endif; ?> </td> </tr> </tbody> <? if ($priviledged): ?> <tfoot class="table_footer"> <tr> <td colspan="2"> <?php echo LinkButton::create(_('Bearbeiten'), PluginEngine::getLink($this->plugin, array(), 'show/edit/' . $scm->id), array('data-dialog' => '')); ?> <? if (count($scms) > 1): ?> <? if ($scm->position == 0): ?> <?php
<? use Studip\Button, Studip\LinkButton; ?> <h1><?php echo _('Manuelle Zuordnung'); ?> </h1> <?php echo isset($flash['error']) ? MessageBox::error($flash['error']) : ''; echo isset($flash['success']) ? MessageBox::success($flash['success']) : ''; echo isset($flash['info']) ? MessageBox::info($flash['info']) : ''; ?> <form action="<?php echo $controller->url_for('course/members/set_autor_csv'); ?> " method="post" name="user"> <?php echo CSRFProtection::tokenTag(); ?> <table class="default"> <thead> <tr> <th class="topic" colspan="2"><?php echo sprintf(_('Folgende %s konnten <b>nicht eindeutig</b> zugewiesen werden. Bitte wählen Sie aus der jeweiligen Trefferliste:'), htmlReady($status_groups['autor'])); ?> </th> </tr> </thead> <tbody> <? foreach($flash['csv_mult_founds'] as $name => $csv_mult_found) : ?> <tr> <td style="width: 40%"><?php echo htmlReady(mila($name, 50));
echo $controller->url_for('admission/userlist/delete', $list->getId()); ?> " onclick="return STUDIP.Dialogs.showConfirmDialog('<?php echo sprintf(_('Soll die Nutzerliste %s wirklich gelöscht werden?'), htmlReady($list->getName())); ?> ', '<?php echo URLHelper::getURL('dispatch.php/admission/userlist/delete/' . $list->getId(), array('really' => 1)); ?> ')"> <?php echo Icon::create('trash', 'clickable', ['title' => _('Personenliste löschen')]); ?> </a> </div> <div id="userlist_details_<?php echo $list->getId(); ?> " style="display: none; margin-left: 20px;"> <?php echo $list->toString(); ?> </div> <?php } ?> </div> <?php } else { echo MessageBox::info(sprintf(_('Es wurden keine Personenlisten gefunden. Sie können eine ' . 'neue %sPersonenliste anlegen%s.'), '<a href="' . $controller->url_for('admission/userlist/configure') . '">', '</a>')); }
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'])); } } }
/** * get form for new user * * returns a form to add a user-account to connected cms * @access public * @param string $new_account_cms system-type * @return string returns html-code */ function getNewAccountForm(&$new_account_cms) { global $connected_cms, $cms_select, $view, $current_module, $messages, $RELATIVE_PATH_ELEARNING_INTERFACE, $ELEARNING_INTERFACE_MODULES; $new_account_step = Request::int('new_account_step'); $ext_password = Request::get('ext_password'); $ext_password_2 = Request::get('ext_password_2'); $ext_username = Request::get('ext_username'); $ref_id = Request::get('ref_id'); $module_type = Request::get('module_type'); ELearningUtils::loadClass($new_account_cms); //Password was sent, but is to short if (isset($ext_password_2) and !Request::submitted('go_back') and Request::submitted('next') and strlen($ext_password_2) < 6) { PageLayout::postMessage(MessageBox::error(_("Das Passwort muss mindestens 6 Zeichen lang sein!"))); $new_account_step--; //Passwords doesn't match password repeat } elseif (isset($ext_password_2) and !Request::submitted('go_back') and Request::submitted('next') and $ext_password != $ext_password_2) { PageLayout::postMessage(MessageBox::error(_("Das Passwort entspricht nicht der Passwort-Wiederholung!"))); $new_account_step--; } // Benutzername was sent if ($ext_username != "" and !Request::submitted('go_back') and Request::submitted('assign')) { $caching_status = $connected_cms[$new_account_cms]->soap_client->getCachingStatus(); $connected_cms[$new_account_cms]->soap_client->setCachingStatus(false); if ($connected_cms[$new_account_cms]->user->verifyLogin($ext_username, $ext_password)) { $is_verified = true; PageLayout::postMessage(MessageBox::info(_("Der Account wurde zugeordnet."))); $connected_cms[$new_account_cms]->user->setCategory(""); $connected_cms[$new_account_cms]->user->setUsername($ext_username); $connected_cms[$new_account_cms]->user->setPassword($ext_password); $connected_cms[$new_account_cms]->user->setConnection(USER_TYPE_ORIGINAL); if ($ref_id != "") { $connected_cms[$new_account_cms]->newContentModule($ref_id, $module_type, true); $module_title = $connected_cms[$new_account_cms]->content_module[$current_module]->getTitle(); $module_links = $connected_cms[$new_account_cms]->link->getUserModuleLinks(); } } else { $new_account_step = 1; PageLayout::postMessage(MessageBox::error(_("Die eingegebenen Login-Daten sind nicht korrekt."))); } $connected_cms[$new_account_cms]->soap_client->setCachingStatus($caching_status); } if (Request::submitted('start')) { $new_account_step = 1; } if (Request::submitted('go_back')) { $new_account_step--; if ($new_account_step < 1) { $new_account_cms = ""; return false; } } elseif (Request::submitted('next') or Request::submitted('assign')) { $new_account_step++; } if ($new_account_step == 2 and Request::submitted('assign')) { // Assign existing Account $step = 'assign'; } elseif ($new_account_step == 2 and Request::submitted('next')) { // Create new Account: ask for new password $step = 'new_account'; } elseif ($new_account_step == 3 and Request::submitted('next')) { // Create new Account $connected_cms[$new_account_cms]->user->setPassword($ext_password); if ($connected_cms[$new_account_cms]->user->newUser() != false) { $is_verified = true; PageLayout::postMessage(MessageBox::info(sprintf(_("Der Account wurde erzeugt und zugeordnet. Ihr Loginname ist %s."), "<b>" . htmlReady($connected_cms[$new_account_cms]->user->getUsername()) . "</b>"))); if ($ref_id != "") { $connected_cms[$new_account_cms]->newContentModule($ref_id, $module_type, true); $module_title = $connected_cms[$new_account_cms]->content_module[$current_module]->getTitle(); $module_links = $connected_cms[$new_account_cms]->link->getUserModuleLinks(); } } } elseif (!$is_verified) { $output .= "<font size=\"-1\">"; if (Request::submitted('start')) { $messages["info"] = sprintf(_("Sie versuchen zum erstem Mal ein Lernmodul des angebundenen Systems %s zu starten. Bevor Sie das Modul nutzen können, muss Ihrem Stud.IP-Benutzeraccount ein Account im angebundenen System zugeordnet werden."), htmlReady($connected_cms[$new_account_cms]->getName())) . "<br><br>\n\n"; } } $template = $GLOBALS['template_factory']->open('elearning/_new_account_form.php'); $template->set_attribute('cms_title', htmlReady($connected_cms[$new_account_cms]->getName())); $template->set_attribute('cms_select', $cms_select); $template->set_attribute('module_title', $module_title); $template->set_attribute('module_links', $module_links); $template->set_attribute('module_type', $module_type); $template->set_attribute('ref_id', $ref_id); $template->set_attribute('ext_username', $ext_username); $template->set_attribute('new_account_cms', $new_account_cms); $template->set_attribute('new_account_step', $new_account_step); $template->set_attribute('is_connected', $connected_cms[$new_account_cms]->user->isConnected()); $template->set_attribute('is_verified', $is_verified); $template->set_attribute('step', $step); if ($is_verified) { $new_account_cms = ""; } return $template->render(); }
echo $one['value']; ?> "> <?php echo htmlReady($one['name']); ?> </option> <? endforeach ?> </select> </section> <div class="text-center" data-dialog-button> </div> <? else : ?> <?php echo MessageBox::info(_("In dieser Veranstaltung können keine weiteren Raumanfragen gestellt werden.")); ?> <? endif ?> <div data-dialog-button> <? if (count($options)) : ?> <?php echo Studip\Button::create(_('Erstellen')); ?> <?php echo Studip\LinkButton::createCancel(_('Abbrechen'), $controller->link_for('index/' . $course_id)); ?> <? else : ?> <?php echo Studip\LinkButton::create(_('Zurück zur Übersicht'), $controller->link_for('index/' . $course_id), array('data-dialog' => 'size=big')); ?> <? endif ?>
/** * Refreshes the smiley table by aligning it with the file system * * @param String $view View to return to */ public function refresh_action($view) { $result = Smiley::refresh(); $message = sprintf(_('%u Operationen wurden durchgeführt.'), array_sum($result)); $details = array(sprintf(_('%d Smileys aktualisiert'), $result['update']), sprintf(_('%d Smileys eingefügt'), $result['insert']), sprintf(_('%d Smileys gelöscht'), $result['delete'])); if (isset($result['favorites'])) { $details[] = sprintf(_('%d Favoriten geändert'), $result['favorites']); } $msg = array_sum($result) > 0 ? MessageBox::success($message, $details, true) : MessageBox::info($message, $details, true); PageLayout::postMessage($msg); $this->redirect('admin/smileys?view=' . $view); }
<? foreach ($faculty['institutes'] as $institute_id => $name): ?> <option style="padding-left: 1.5em;" value="<?php echo $institute_id; ?> " <? if ($institute_id == $resObject->getInstitutId()) echo 'selected'; ?>> <?php echo htmlReady(my_substr($name, 0, 50)); ?> </option> <? endforeach; ?> <? endforeach; ?> </select> <? else : ?> <?php echo MessageBox::info(_('Sie können die Einordnung in die Orga-Struktur nicht ändern.')); ?> <? endif; ?> </td> </tr> <? endif; ?> <? if ($resObject->getCategoryId()) : ?> <? foreach ($EditResourceData->selectProperties() as $property): ?> <tr> <td> </td> <td> <label for="property_<?php echo $property['property_id']; ?> "> <?php
function my_info($msg, $class="blank", $colspan='', $add_row='', $small='') { echo '<tr><td class="'.$class.'" colspan="'.$colspan.'">'; echo MessageBox::info($msg); echo '</td></tr>'; }
</i> </span> <br/> <?php } ?> <div style="clear: both;"> <?php echo LinkButton::create(_('Anmelderegel hinzufügen'), $controller->url_for('admission/rule/select_type' . ($courseset ? '/' . $courseset->getId() : '')), array('onclick' => "return STUDIP.Admission.selectRuleType(this)")); ?> </div> </div> </fieldset> <div class="hidden-alert" style="display:none"> <?php echo MessageBox::info(_("Diese Daten sind noch nicht gespeichert.")); ?> </div> <fieldset> <legend><?php echo _('Weitere Daten'); ?> </legend> <? if (!$instant_course_set_view) : ?> <? if ($courseset && $courseset->getSeatDistributionTime()) :?> <label class="caption"> <?php echo _('Personenlisten zuordnen:'); ?> </label>
$found_items[] = htmlReady($the_tree->tree->getItemPath($rs->f("item_id"))); $the_tree->openItem($rs->f("item_id")); } } if (Request::get('search_sem') && strlen(Request::get('search_sem')) > 1) { $view->params[0] = "%" . Request::quoted('search_sem') . "%"; $rs = $view->get_query("view:TREE_SEARCH_SEM"); while ($rs->next_record()) { $found_items[] = htmlReady($the_tree->tree->getItemPath($rs->f("item_id"))); $the_tree->openItem($rs->f("item_id")); } } if (count($found_items)) { $message = MessageBox::info(_('Gefundene Einrichtungen:'), $found_items); } else { $message = MessageBox::info(_('Es konnte keine Einrichtung gefunden werden, die Ihrer Suchanfrage entspricht.')); } PageLayout::postMessage($message); } ?> <h1><?php echo _('Suche nach Einrichtungen'); ?> </h1> <? if ($msg) { echo "\n<table width=\"99%\" border=\"0\" cellpadding=\"2\" cellspacing=\"0\">"; parse_msg ($msg,"§","blank",1,false); echo "\n</table>"; }