From 940d2aaa8638b4e0c764579cb3977e7be527c81f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Noack?= Date: Thu, 12 Dec 2024 14:52:00 +0000 Subject: StEP 1552 closes #1552 Closes #1552 Merge request studip/studip!1137 --- app/controllers/admin/courses.php | 2 +- app/controllers/api/oauth2/oauth2_controller.php | 7 - app/controllers/blubber.php | 2 +- app/controllers/consultation/admin.php | 2 +- app/controllers/course/basicdata.php | 8 +- app/controllers/course/details.php | 6 +- app/controllers/course/enrolment.php | 4 +- app/controllers/course/go.php | 69 ++++ app/controllers/course/members.php | 2 +- app/controllers/course/statusgroups.php | 2 +- app/controllers/course/studygroup.php | 8 +- app/controllers/debugbar.php | 18 +- app/controllers/login.php | 173 ++++++++ app/controllers/logout.php | 63 +++ app/controllers/media_proxy.php | 2 +- app/controllers/my_courses.php | 6 +- app/controllers/my_institutes.php | 4 +- app/controllers/oer/endpoints.php | 2 +- app/controllers/registration.php | 87 +++- app/controllers/search/globalsearch.php | 2 +- app/controllers/settings/avatar.php | 4 +- app/controllers/settings/settings.php | 27 +- app/controllers/start.php | 8 +- app/controllers/terms.php | 2 +- app/controllers/web_migrate.php | 1 - app/views/admin/autoinsert/index.php | 2 +- app/views/admin/user/_course_files.php | 4 +- app/views/admin/user/_course_list.php | 4 +- app/views/admin/user/_priority_list.php | 4 +- app/views/admin/user/_waiting_list.php | 4 +- app/views/api/oauth2/authorize.php | 2 +- app/views/course/enrolment/apply.php | 2 +- app/views/course/scm/edit.php | 2 +- app/views/course/studygroup/edit.php | 2 +- app/views/login/_login_faq.php | 18 + app/views/login/_login_news.php | 59 +++ app/views/login/_standard_loginform.php | 69 ++++ app/views/login/activate_email.php | 39 ++ app/views/login/index.php | 156 +++++++ app/views/login/privacy_info.php | 216 ++++++++++ app/views/my_courses/groups.php | 2 +- app/views/my_studygroups/_course.php | 8 +- app/views/public_courses/index.php | 4 +- app/views/questionnaire/context.php | 4 +- app/views/registration/email_validation.php | 1 + app/views/settings/notification.php | 2 +- app/views/studygroup/browse.php | 2 +- cli/studip_cli_env.inc.php | 6 - composer.json | 5 +- config/config_defaults.inc.php | 4 + lib/admin_search.inc.php | 2 +- lib/authentication/Manager.php | 152 +++++++ lib/bootstrap-definitions.php | 13 + lib/bootstrap.php | 16 - lib/classes/CSRFProtection.php | 36 +- lib/classes/Context.php | 2 +- .../JsonApi/Middlewares/Auth/SessionStrategy.php | 2 +- lib/classes/JsonApi/Middlewares/Authentication.php | 11 +- lib/classes/Markup.php | 3 +- lib/classes/ModulesNotification.php | 2 +- lib/classes/ObjectdisplayHelper.php | 2 +- lib/classes/PluginController.php | 1 + lib/classes/Seminar_Perm.php | 354 ++++++++++++++++ lib/classes/Seminar_User.php | 116 ++++++ lib/classes/StudipController.php | 42 +- lib/classes/StudipCoreFormat.php | 2 +- lib/classes/StudipDispatcher.php | 14 + lib/classes/StudipResponse.php | 126 ++++-- lib/classes/TwoFactorAuth.php | 2 +- lib/classes/UserManagement.php | 2 +- lib/classes/auth_plugins/StudipAuthOAuth2.php | 2 +- lib/classes/email_validation_class.php | 271 ++++++++++++ lib/classes/forms/Form.php | 4 +- lib/cronjobs/session_gc.php | 4 +- lib/functions.php | 25 +- lib/helpers.php | 16 + lib/middleware/AuthenticationMiddleware.php | 40 ++ lib/middleware/SeminarOpenMiddleware.php | 295 +++++++++++++ lib/middleware/SessionMiddleware.php | 43 ++ lib/navigation/AdminNavigation.php | 2 +- lib/navigation/AvatarNavigation.php | 2 +- lib/phplib/CT_Cache.php | 68 --- lib/phplib/CT_Sql.php | 101 ----- lib/phplib/DB_Sql.php | 260 ------------ lib/phplib/Seminar_Auth.php | 455 --------------------- lib/phplib/Seminar_Default_Auth.php | 19 - lib/phplib/Seminar_Perm.php | 354 ---------------- lib/phplib/Seminar_Register_Auth.php | 242 ----------- lib/phplib/Seminar_Session.php | 436 -------------------- lib/phplib/Seminar_User.php | 116 ------ lib/phplib/email_validation.php | 271 ------------ lib/phplib/page_open.php | 62 --- lib/phplib/prepend4.php | 78 ---- lib/plugins/core/StudIPPlugin.php | 33 +- lib/plugins/engine/PluginManager.php | 2 +- lib/seminar_open.php | 266 ------------ lib/session/CacheSessionHandler.php | 100 +++++ lib/session/DbSessionHandler.php | 114 ++++++ lib/session/Manager.php | 229 +++++++++++ lib/user_visible.inc.php | 4 +- locale/de/LC_HELP/visibility_decision.php | 4 +- public/activate_email.php | 124 ------ public/datenschutz.php | 37 -- public/dispatch.php | 22 +- public/email_validation.php | 108 ----- public/index.php | 9 +- public/jsonapi.php | 12 +- public/logout.php | 67 +-- public/plugins.php | 103 ++--- public/seminar_main.php | 60 +-- public/sendfile.php | 22 +- public/web_migrate.php | 13 +- resources/assets/stylesheets/scss/index.scss | 1 + resources/assets/stylesheets/scss/layouts.scss | 6 +- templates/blubber/course_context.php | 4 +- templates/dates/seminar_html.php | 2 +- templates/email-validation.php | 1 - templates/login/_login_faq.php | 18 - templates/login/_login_news.php | 59 --- templates/login/_standard_loginform.php | 69 ---- templates/login_emailactivation.php | 36 -- templates/loginform.php | 185 --------- templates/mail/notification_html.php | 2 +- templates/mail/notification_text.php | 2 +- templates/privacy.php | 216 ---------- templates/shared/opengraphinfo_wide.php | 2 +- tests/_support/Helper/Jsonapi.php | 6 - tests/jsonapi/SeminarCycleDatesShowTest.php | 2 - tests/jsonapi/_bootstrap.php | 16 +- tests/unit/_bootstrap.php | 46 ++- tests/unit/lib/classes/AvatarClassTest.php | 2 +- tests/unit/lib/classes/MarkupClassTest.php | 6 +- tests/unit/lib/classes/MigrationTest.php | 5 + vendor/email_message/debug_message.php | 6 +- 134 files changed, 3147 insertions(+), 4072 deletions(-) create mode 100644 app/controllers/course/go.php create mode 100644 app/controllers/login.php create mode 100644 app/controllers/logout.php create mode 100644 app/views/login/_login_faq.php create mode 100644 app/views/login/_login_news.php create mode 100644 app/views/login/_standard_loginform.php create mode 100644 app/views/login/activate_email.php create mode 100644 app/views/login/index.php create mode 100644 app/views/login/privacy_info.php create mode 100644 app/views/registration/email_validation.php create mode 100644 lib/authentication/Manager.php create mode 100644 lib/classes/Seminar_Perm.php create mode 100644 lib/classes/Seminar_User.php create mode 100644 lib/classes/email_validation_class.php create mode 100644 lib/middleware/AuthenticationMiddleware.php create mode 100644 lib/middleware/SeminarOpenMiddleware.php create mode 100644 lib/middleware/SessionMiddleware.php delete mode 100644 lib/phplib/CT_Cache.php delete mode 100644 lib/phplib/CT_Sql.php delete mode 100644 lib/phplib/DB_Sql.php delete mode 100644 lib/phplib/Seminar_Auth.php delete mode 100644 lib/phplib/Seminar_Default_Auth.php delete mode 100644 lib/phplib/Seminar_Perm.php delete mode 100644 lib/phplib/Seminar_Register_Auth.php delete mode 100644 lib/phplib/Seminar_Session.php delete mode 100644 lib/phplib/Seminar_User.php delete mode 100644 lib/phplib/email_validation.php delete mode 100644 lib/phplib/page_open.php delete mode 100644 lib/phplib/prepend4.php delete mode 100644 lib/seminar_open.php create mode 100644 lib/session/CacheSessionHandler.php create mode 100644 lib/session/DbSessionHandler.php create mode 100644 lib/session/Manager.php delete mode 100644 public/activate_email.php delete mode 100644 public/datenschutz.php delete mode 100644 public/email_validation.php delete mode 100644 templates/email-validation.php delete mode 100644 templates/login/_login_faq.php delete mode 100644 templates/login/_login_news.php delete mode 100644 templates/login/_standard_loginform.php delete mode 100644 templates/login_emailactivation.php delete mode 100644 templates/loginform.php delete mode 100644 templates/privacy.php diff --git a/app/controllers/admin/courses.php b/app/controllers/admin/courses.php index 53fdbc4..2ff2a9e 100644 --- a/app/controllers/admin/courses.php +++ b/app/controllers/admin/courses.php @@ -706,7 +706,7 @@ class Admin_CoursesController extends AuthenticatedController foreach ($icons as $icon) { $d['contents'] .= '
  • - getTitle() ? ' title="'.htmlReady($icon->getTitle()).'"' : '') .'> + getTitle() ? ' title="'.htmlReady($icon->getTitle()).'"' : '') .'> '. $icon->getImage()->asImg() .'
  • '; diff --git a/app/controllers/api/oauth2/oauth2_controller.php b/app/controllers/api/oauth2/oauth2_controller.php index 6b3dacd..e9208fc 100644 --- a/app/controllers/api/oauth2/oauth2_controller.php +++ b/app/controllers/api/oauth2/oauth2_controller.php @@ -15,13 +15,6 @@ abstract class OAuth2Controller extends StudipController { parent::before_filter($action, $args); - page_open([ - 'sess' => 'Seminar_Session', - 'auth' => 'Seminar_Default_Auth', - 'perm' => 'Seminar_Perm', - 'user' => 'Seminar_User', - ]); - $this->set_layout(null); $this->container = new Studip\OAuth2\Container(); diff --git a/app/controllers/blubber.php b/app/controllers/blubber.php index 8ede39e..550770b 100644 --- a/app/controllers/blubber.php +++ b/app/controllers/blubber.php @@ -423,7 +423,7 @@ class BlubberController extends AuthenticatedController ); PageLayout::postSuccess(sprintf(_('Studiengruppe "%s" wurde angelegt.'), htmlReady($course['name']))); - $this->redirect(URLHelper::getURL('seminar_main.php', ['auswahl' => $course->getId()])); + $this->redirect(URLHelper::getURL('dispatch.php/course/go', ['to' => $course->getId()])); } } diff --git a/app/controllers/consultation/admin.php b/app/controllers/consultation/admin.php index 21507ed..011e424 100644 --- a/app/controllers/consultation/admin.php +++ b/app/controllers/consultation/admin.php @@ -790,7 +790,7 @@ class Consultation_AdminController extends ConsultationController // Redirect to message write $_SESSION['sms_data'] = compact('p_rec'); - page_close(); + sess()->save(); $this->redirect(URLHelper::getURL( 'dispatch.php/messages/write', compact('default_subject') diff --git a/app/controllers/course/basicdata.php b/app/controllers/course/basicdata.php index f463a04..4524153 100644 --- a/app/controllers/course/basicdata.php +++ b/app/controllers/course/basicdata.php @@ -368,7 +368,7 @@ class Course_BasicdataController extends AuthenticatedController _('Veranstaltung kopieren'), $this->url_for( 'course/wizard/copy/' . $this->course_id, - ['studip_ticket' => Seminar_Session::get_ticket()] + ['studip_ticket' => get_ticket()] ), Icon::create('seminar') ); @@ -381,7 +381,7 @@ class Course_BasicdataController extends AuthenticatedController _('Sperrebene ändern') . ' (' . ($is_locked ? _('gesperrt') : _('nicht gesperrt')) . ')', $this->url_for( 'course/management/lock', - ['studip_ticket' => Seminar_Session::get_ticket()] + ['studip_ticket' => get_ticket()] ), Icon::create('lock-' . ($is_locked ? 'locked' : 'unlocked')) )->asDialog('size=auto'); @@ -397,7 +397,7 @@ class Course_BasicdataController extends AuthenticatedController $is_visible ? _('Veranstaltung verstecken') : _('Veranstaltung sichtbar schalten'), $this->url_for( 'course/management/change_visibility', - ['studip_ticket' => Seminar_Session::get_ticket()] + ['studip_ticket' => get_ticket()] ), Icon::create('visibility-' . ($is_visible ? 'visible' : 'invisible')) ); @@ -428,7 +428,7 @@ class Course_BasicdataController extends AuthenticatedController _('Veranstaltung löschen'), $this->url_for( 'course/archive/confirm', - ['studip_ticket' => Seminar_Session::get_ticket()] + ['studip_ticket' => get_ticket()] ), Icon::create('trash') )->asDialog('size=auto'); diff --git a/app/controllers/course/details.php b/app/controllers/course/details.php index 707b0ed..ab1c2a6 100644 --- a/app/controllers/course/details.php +++ b/app/controllers/course/details.php @@ -39,7 +39,7 @@ class Course_DetailsController extends AuthenticatedController } $this->send_from_search_page = Request::get('send_from_search_page'); - if ($GLOBALS['SessionSeminar'] != $this->course->id + if (isset($GLOBALS['SessionSeminar']) && $GLOBALS['SessionSeminar'] != $this->course->id && !(int)$this->course->visible && !($GLOBALS['perm']->have_perm(Config::get()->SEM_VISIBILITY_PERM) || $GLOBALS['perm']->have_studip_perm('user', $this->course->id))) { @@ -52,7 +52,7 @@ class Course_DetailsController extends AuthenticatedController if ($this->course->getSemClass()->offsetGet('studygroup_mode')) { if ($GLOBALS['perm']->have_studip_perm('autor', $this->course->id)) { // participants may see seminar_main - $link = URLHelper::getUrl('seminar_main.php', ['auswahl' => $this->course->id]); + $link = URLHelper::getUrl('dispatch.php/course/go', ['to' => $this->course->id]); } else { $link = URLHelper::getUrl('dispatch.php/course/studygroup/details/' . $this->course->id, [ 'send_from_search_page' => $this->send_from_search_page, @@ -202,7 +202,7 @@ class Course_DetailsController extends AuthenticatedController $enrolment_info = null; - if ($GLOBALS['SessionSeminar'] === $this->course->id) { + if (isset($GLOBALS['SessionSeminar']) && $GLOBALS['SessionSeminar'] === $this->course->id) { Navigation::activateItem('/course/main/details'); } else { $enrolment_info = $this->course->getEnrolmentInformation($GLOBALS['user']->id); diff --git a/app/controllers/course/enrolment.php b/app/controllers/course/enrolment.php index e2c0e76..97aa62e 100644 --- a/app/controllers/course/enrolment.php +++ b/app/controllers/course/enrolment.php @@ -49,7 +49,7 @@ class Course_EnrolmentController extends AuthenticatedController || ($enrolment_info->getCodeword() === 'free_access' && !User::findCurrent()) ) ) { - $redirect_url = URLHelper::getUrl('seminar_main.php', ['auswahl' => $this->course_id]); + $redirect_url = URLHelper::getUrl('dispatch.php/course/go', ['to' => $this->course_id]); if (Request::isXhr()) { $this->response->add_header('X-Location', $redirect_url); $this->render_nothing(); @@ -252,7 +252,7 @@ class Course_EnrolmentController extends AuthenticatedController if (!empty($course) && $course->admission_prelim) { $this->relocate(URLHelper::getLink('dispatch.php/course/details', ['sem_id' => $this->course_id])); } else { - $this->relocate(URLHelper::getLink('seminar_main.php', ['auswahl' => $this->course_id])); + $this->relocate(URLHelper::getLink('dispatch.php/course/go', ['to' => $this->course_id])); } } elseif ($enrol_user) { diff --git a/app/controllers/course/go.php b/app/controllers/course/go.php new file mode 100644 index 0000000..03ae1df --- /dev/null +++ b/app/controllers/course/go.php @@ -0,0 +1,69 @@ + + * @license GPL2 or any later version + * @since 6.0 + */ + +class Course_GoController extends AuthenticatedController +{ + protected $allow_nobody = true; + + public function __construct(\Trails\Dispatcher $dispatcher) + { + if (Request::option('to')) { + Request::set('cid', Request::option('to')); + } + parent::__construct($dispatcher); + } + + public function index_action() + { + $course_id = Context::getId(); + + if (!$course_id && Request::get('cid')) { + $archive_id = Request::get('cid'); + $archived = ArchivedCourse::find($archive_id); + if ($archived) { + $this->redirect(URLHelper::getURL('dispatch.php/search/archive', [ + 'criteria' => $archived->name, + ])); + return; + } + } + + if (!$course_id) { + throw new CheckObjectException(_('Sie haben kein Objekt gewählt.')); + } + + //set visitdate for course, when coming from my_courses + if (Request::get('to')) { + object_set_visit($course_id, 0); + } + + + // gibt es eine Anweisung zur Umleitung? + $redirect_to = Request::get('redirect_to'); + if ($redirect_to) { + if (!is_internal_url($redirect_to)) { + throw new Exception('Invalid redirection'); + } + + $this->redirect(URLHelper::getURL($redirect_to, ['cid' => $course_id])); + return; + } + + // der Nutzer zum ersten + //Reiter der Veranstaltung weiter geleitet. + if (Navigation::hasItem("/course")) { + foreach (Navigation::getItem("/course")->getSubNavigation() as $index => $navigation) { + if ($index !== 'admin') { + $this->redirect(URLHelper::getURL($navigation->getURL())); + return; + } + } + } + } +} diff --git a/app/controllers/course/members.php b/app/controllers/course/members.php index 822f4a4..df36820 100644 --- a/app/controllers/course/members.php +++ b/app/controllers/course/members.php @@ -143,7 +143,7 @@ class Course_MembersController extends AuthenticatedController $this->tutoren = $filtered_members['tutor']->toArray(); $this->autoren = $filtered_members['autor']->toArray(); $this->users = $filtered_members['user']->toArray(); - $this->studipticket = Seminar_Session::get_ticket(); + $this->studipticket = get_ticket(); $this->subject = $this->getSubject(); $this->groups = $this->status_groups; $this->semAdmissionEnabled = false; diff --git a/app/controllers/course/statusgroups.php b/app/controllers/course/statusgroups.php index cbd80ad..24efa02 100644 --- a/app/controllers/course/statusgroups.php +++ b/app/controllers/course/statusgroups.php @@ -1582,7 +1582,7 @@ class Course_StatusgroupsController extends AuthenticatedController _('Die Gruppen wurden in die Veranstaltung %s kopiert.'), sprintf( '%s', - URLHelper::getLink('seminar_main.php', ['auswahl' => $target_course_id], true), + URLHelper::getLink('dispatch.php/course/go', ['to' => $target_course_id], true), htmlReady($target_course->getFullName()) ), )); diff --git a/app/controllers/course/studygroup.php b/app/controllers/course/studygroup.php index e9a0f02..981a152 100644 --- a/app/controllers/course/studygroup.php +++ b/app/controllers/course/studygroup.php @@ -108,7 +108,7 @@ class Course_StudygroupController extends AuthenticatedController $icon = $icon->copyWithRole('info'); $infotext = _('Mitgliedschaft bereits beantragt!'); } else { - $infolink = URLHelper::getURL('seminar_main.php', ['auswahl' => $studygroup->id]); + $infolink = URLHelper::getURL('dispatch.php/course/go', ['to' => $studygroup->id]); $infotext = _('Direkt zur Studiengruppe'); } } else if ($GLOBALS['perm']->have_perm('admin')) { @@ -205,7 +205,7 @@ class Course_StudygroupController extends AuthenticatedController Sidebar::get()->addWidget($actions); } // ... otherwise redirect us to the seminar else { - $this->redirect(URLHelper::getURL('seminar_main.php?auswahl=' . $id)); + $this->redirect(URLHelper::getURL('dispatch.php/course/go?to=' . $id)); } } @@ -408,7 +408,7 @@ class Course_StudygroupController extends AuthenticatedController } if (!$perm->have_studip_perm('tutor', $id)) { - $this->redirect(URLHelper::getURL('seminar_main.php', ['auswahl' => $id])); + $this->redirect(URLHelper::getURL('dispatch.php/course/go', ['to' => $id])); return; } @@ -570,7 +570,7 @@ class Course_StudygroupController extends AuthenticatedController $id = Context::getId(); if (!$perm->have_studip_perm('tutor', $id)) { - $this->redirect(URLHelper::getURL('seminar_main.php', ['auswahl' => $id])); + $this->redirect(URLHelper::getURL('dispatch.php/course/go', ['to' => $id])); exit; } diff --git a/app/controllers/debugbar.php b/app/controllers/debugbar.php index 9fc5286..3f43bd2 100644 --- a/app/controllers/debugbar.php +++ b/app/controllers/debugbar.php @@ -1,5 +1,5 @@ set_content_type('text/css;charset=utf-8'); - $this->render_nothing(); + $this->response->add_header('Content-Type', 'text/css;charset=utf-8'); + + ob_start(); $this->debugbar->getJavascriptRenderer()->dumpCssAssets(); + $content = ob_get_contents(); + ob_end_clean(); + $this->render_text($content); + } public function js_action(): void { - $this->set_content_type('text/javascript;charset=utf-8'); - $this->render_nothing(); + $this->response->add_header('Content-Type', 'text/javascript;charset=utf-8'); + ob_start(); $this->debugbar->getJavascriptRenderer()->setIncludeVendors(false)->dumpJsAssets(); + $content = ob_get_contents(); + ob_end_clean(); + $this->render_text($content); } } diff --git a/app/controllers/login.php b/app/controllers/login.php new file mode 100644 index 0000000..09a7c6b --- /dev/null +++ b/app/controllers/login.php @@ -0,0 +1,173 @@ + + * @license http://www.gnu.org/licenses/gpl-2.0.html GPL version 2 + * @category Stud.IP + */ +class LoginController extends AuthenticatedController +{ + protected $allow_nobody = true; + + public function __construct(\Trails\Dispatcher $dispatcher) + { + Config::get()->USER_VISIBILITY_CHECK = false; + parent::__construct($dispatcher); + } + + public function index_action() + { + if ($GLOBALS['user']->id !== 'nobody') { + $this->redirect(URLHelper::getURL('dispatch.php/start')); + return; + } + + if (Request::isXhr()) { + if (Request::isDialog()) { + $this->relocate(URLHelper::getURL($_SERVER['REQUEST_URI'])); + return; + } + throw new AccessDeniedException(); + } + + if (Request::submitted('user_config_submitted')) { + CSRFProtection::verifyUnsafeRequest(); + if (Request::submitted('unset_contrast')) { + $_SESSION['contrast'] = 0; + $this->redirect('login/index'); //we're too late to remove the high contrast mode, so we reload the page + return; + } + if (Request::submitted('set_contrast')) { + $_SESSION['contrast'] = 1; + } + + + foreach (array_keys($GLOBALS['INSTALLED_LANGUAGES']) as $language_key) { + if (Request::submitted('set_language_' . $language_key)) { + $_SESSION['forced_language'] = $language_key; + $_SESSION['_language'] = $language_key; + init_i18n($_SESSION['_language']); + } + } + if (!empty($_SESSION['contrast'])) { + \PageLayout::addStylesheet('accessibility.css'); + } + + } + if (Request::isPost()) { + CSRFProtection::verifyUnsafeRequest(); + + $check_auth = StudipAuthAbstract::CheckAuthentication(Request::get('loginname'), Request::get('password')); + + if ($check_auth['uid']) { + $uid = $check_auth['uid']; + if (isset($check_auth['need_email_activation']) && $check_auth['need_email_activation'] == $uid) { + $this->need_email_activation = $uid; + $_SESSION['semi_logged_in'] = $uid; + $this->redirect('login/activate_email', ['uid' => $uid]); + return; + } else { + auth()->setAuthenticatedUser($check_auth['user']); + Metrics::increment('core.login.succeeded'); + sess()->regenerateId(['auth', '_language', 'phpCAS', 'contrast']); + if (isset($_SESSION['redirect_after_login'] )) { + $this->redirect($_SESSION['redirect_after_login']); + return; + } + $this->redirect('start/index'); + return; + } + } else { + Metrics::increment('core.login.failed'); + $this->error_msg = $check_auth['error']; + } + } + + + if ($this->error_msg) { + PageLayout::postException(_('Bei der Anmeldung trat ein Fehler auf!'), $this->error_msg); + } + $this->uname = (isset($this->auth["uname"]) ? $this->auth["uname"] : Request::username('loginname')); + $this->self_registration_activated = Config::get()->ENABLE_SELF_REGISTRATION; + + $news_entries = StudipNews::GetNewsByRange('login', true, false); + if (class_exists('LoginFaq')) { + $this->faq_entries = LoginFaq::findBySQL("1 ORDER BY `faq_id` ASC"); + } + $this->news_entries = array_values($news_entries); + PageLayout::setHelpKeyword('Basis.AnmeldungLogin'); + PageLayout::disableSidebar(); + PageLayout::setBodyElementId('login'); + } + + public function activate_email_action() + { + PageLayout::setTitle(_('E-Mail Aktivierung')); + $uid = Request::option('uid'); + $user = User::find($uid); + + if (!$user) { + throw new \Trails\Exception(400); + } + if (Request::get('key')) { + $key = $user->validation_key; + + if (Request::get('key') === $key) { + $user->validation_key = ''; + $user->store(); + unset($_SESSION['semi_logged_in']); + PageLayout::postSuccess(_('Ihre E-Mail-Adresse wurde erfolgreich geändert.')); + $this->redirect(URLHelper::getURL('dispatch.php/start')); + return; + } else if ($key == '') { + PageLayout::postInfo(_('Ihre E-Mail-Adresse ist bereits geändert.')); + $this->redirect(URLHelper::getURL('dispatch.php/start')); + return; + } else { + if (Request::get('key')) { + PageLayout::postError(_("Falscher Bestätigungscode.")); + } + $this->mail_explain = true; + if ($_SESSION['semi_logged_in'] == Request::option('uid')) { + $this->reenter_mail = true; + } else { + PageLayout::postInfo(_('Sie können sich einloggen und sich den Bestätigungscode neu oder an eine andere E-Mail-Adresse schicken lassen.')); + $this->redirect(URLHelper::getURL('dispatch.php/start')); + return; + } + } + + // checking semi_logged_in is important to avoid abuse + } else if (Request::get('email1') && Request::get('email2') && $_SESSION['semi_logged_in'] == Request::option('uid')) { + if (Request::get('email1') == Request::get('email2')) { + // change mail + $tmp_user = User::find(Request::option('uid')); + if ($tmp_user && $tmp_user->changeEmail(Request::get('email1'), true)) { + $_SESSION['semi_logged_in'] = false; + } + + } else { + PageLayout::postError(_('Die eingegebenen E-Mail-Adressen stimmen nicht überein. Bitte überprüfen Sie Ihre Eingabe.')); + } + $this->mail_explain = true; + $this->reenter_mail = true; + } else { + $this->mail_explain = true; + } + } + + public function privacy_info_action() + { + // this page must be accessible during visibility decision + Config::get()->USER_VISIBILITY_CHECK = false; + + PageLayout::setTitle(_('Erläuterungen zum Datenschutz')); + } +} diff --git a/app/controllers/logout.php b/app/controllers/logout.php new file mode 100644 index 0000000..22a93f0 --- /dev/null +++ b/app/controllers/logout.php @@ -0,0 +1,63 @@ + + * @license http://www.gnu.org/licenses/gpl-2.0.html GPL version 2 + * @category Stud.IP + */ +class LogoutController extends AuthenticatedController +{ + protected $allow_nobody = true; + + public function index_action() + { + if ($GLOBALS['user']->id !== 'nobody') { + $my_messaging_settings = $GLOBALS['user']->cfg->MESSAGING_SETTINGS; + + //Wenn Option dafuer gewaehlt, alle ungelsesenen Nachrichten als gelesen speichern + if ($my_messaging_settings["logout_markreaded"]) { + Message::markAllAs(); + } + + $logout_user = $GLOBALS['user']->id; + $_language = $_SESSION['_language']; + $contrast = UserConfig::get($GLOBALS['user']->id)->USER_HIGH_CONTRAST; + + // Get auth plugin of user before logging out since the $auth object will + // be modified by the logout + $auth_plugin = StudipAuthAbstract::getInstance($GLOBALS['user']->auth_plugin); + + sess()->destroy(); + //Session changed zuruecksetzen + $timeout=(time()-(15 * 60)); + $GLOBALS['user']->set_last_action($timeout); + + // Perform logout from auth plugin (if possible) + if ($auth_plugin instanceof StudipAuthSSO) { + $auth_plugin->logout(); + } + + sess()->start(); + $_SESSION['_language'] = $_language; + if ($contrast) { + $_SESSION['contrast'] = $contrast; + } + NotificationCenter::addObserver(function() { + throw new NotificationVetoException(); + }, '__invoke', 'PageCloseWillExecute'); + PageLayout::postSuccess( + _('Sie sind nun aus dem System abgemeldet.'), + array_filter([$GLOBALS['UNI_LOGOUT_ADD']]) + ); + } + + $this->redirect(URLHelper::getURL('dispatch.php/start')); + } +} diff --git a/app/controllers/media_proxy.php b/app/controllers/media_proxy.php index b98b49c..7b37544 100644 --- a/app/controllers/media_proxy.php +++ b/app/controllers/media_proxy.php @@ -34,7 +34,7 @@ class MediaProxyController extends StudipController $config = Config::GetInstance(); $modified_since = NULL; - if (!Seminar_Session::is_current_session_authenticated() || + if (!sess()->isCurrentSessionAuthenticated() || $config->getValue('LOAD_EXTERNAL_MEDIA') != 'proxy') { throw new AccessDeniedException(); } diff --git a/app/controllers/my_courses.php b/app/controllers/my_courses.php index 187d6c6..c7a6771 100644 --- a/app/controllers/my_courses.php +++ b/app/controllers/my_courses.php @@ -334,7 +334,7 @@ class MyCoursesController extends AuthenticatedController public function decline_action($course_id, $waiting = null) { $course = Course::find($course_id); - $ticket_check = Seminar_Session::check_ticket(Request::option('studipticket')); + $ticket_check = check_ticket(Request::option('studipticket')); if (LockRules::Check($course_id, 'participants')) { $lockdata = LockRules::getObjectRule($course_id); PageLayout::postError(sprintf( @@ -419,8 +419,8 @@ class MyCoursesController extends AuthenticatedController PageLayout::postQuestion( $message, - $this->declineURL($course_id, ['cmd' => $cmd, 'studipticket' => Seminar_Session::get_ticket()]), - $this->declineURL($course_id, ['cmd' => 'back', 'studipticket' => Seminar_Session::get_ticket()]) + $this->declineURL($course_id, ['cmd' => $cmd, 'studipticket' => get_ticket()]), + $this->declineURL($course_id, ['cmd' => 'back', 'studipticket' => get_ticket()]) ); $this->redirect('my_courses/index'); return; diff --git a/app/controllers/my_institutes.php b/app/controllers/my_institutes.php index 0e15489..6093e72 100644 --- a/app/controllers/my_institutes.php +++ b/app/controllers/my_institutes.php @@ -33,13 +33,13 @@ class MyInstitutesController extends AuthenticatedController public function decline_inst_action($inst_id) { $institut = Institute::find($inst_id); - $ticket_check = Seminar_Session::check_ticket(Request::option('studipticket')); + $ticket_check = check_ticket(Request::option('studipticket')); if (Request::option('cmd') !== 'kill' && Request::get('cmd') !== 'back') { $this->flash['decline_inst'] = true; $this->flash['inst_id'] = $inst_id; $this->flash['name'] = $institut->name; - $this->flash['studipticket'] = Seminar_Session::get_ticket(); + $this->flash['studipticket'] = get_ticket(); } elseif (Request::get('cmd') === 'kill' && $ticket_check && Request::get('cmd') !== 'back') { $changed = InstituteMember::deleteBySQL( "user_id = ? AND Institut_id = ? AND inst_perms = 'user'", diff --git a/app/controllers/oer/endpoints.php b/app/controllers/oer/endpoints.php index 1ce9626..bf398bf 100644 --- a/app/controllers/oer/endpoints.php +++ b/app/controllers/oer/endpoints.php @@ -322,7 +322,7 @@ class Oer_EndpointsController extends StudipController while (ob_get_level()) { ob_end_clean(); } - page_close(); + sess()->save(); if (!file_exists($this->material->getFilePath())) { throw new Exception(_('Die gewünschte Datei konnte nicht gefunden werden.')); diff --git a/app/controllers/registration.php b/app/controllers/registration.php index 4c550ce..5ca4cfd 100644 --- a/app/controllers/registration.php +++ b/app/controllers/registration.php @@ -124,22 +124,85 @@ class RegistrationController extends AuthenticatedController $this->registrationform->addStoreCallback( function (Form $form) { $new_user = $form->getLastPart()->getContextObject(); - - $GLOBALS['sess']->regenerate_session_id(['auth']); - $GLOBALS['auth']->unauth(); - $GLOBALS['auth']->auth['jscript'] = true; - $GLOBALS['auth']->auth['perm'] = $new_user['perms']; - $GLOBALS['auth']->auth['uname'] = $new_user['username']; - $GLOBALS['auth']->auth['auth_plugin'] = $new_user['auth_plugin']; - $GLOBALS['auth']->auth_set_user_settings($new_user->user_id); - $GLOBALS['auth']->auth['uid'] = $new_user['user_id']; - - Seminar_Register_Auth::sendValidationMail($new_user); - + sess()->regenerateId(); + auth()->setAuthenticatedUser($new_user); + auth()->sendValidationMail($new_user); return 1; } ); $this->registrationform->autoStore()->setURL(URLHelper::getURL('dispatch.php/start')); } + + public function email_validation_action() + { + if (!User::findCurrent()) { + $_SESSION['redirect_after_login'] = Request::url(); + sess()->save(); + $this->redirect(URLHelper::getURL('dispatch.php/login')); + return; + } + // hier wird noch mal berechnet, welches secret in der Bestaetigungsmail uebergeben wurde + $secret = Request::option('secret'); + PageLayout::setHelpKeyword('Basis.AnmeldungMail'); + PageLayout::setTitle(_('Bestätigung der E-Mail-Adresse')); + //user bereits vorhanden + if ($GLOBALS['perm']->have_perm('autor')) { + $info = sprintf(_('Sie haben schon den Status %s im System. + Eine Aktivierung des Accounts ist nicht mehr nötig, um Schreibrechte zu bekommen'), $GLOBALS['user']->perms); + $details = []; + $details[] = sprintf('%s', URLHelper::getLink('index.php'), _('zurück zur Startseite')); + $message = MessageBox::info($info, $details); + } + + // So, wer bis hier hin gekommen ist gehoert zur Zielgruppe... + // Volltrottel (oder abuse) + elseif (empty($secret)) { + $message = MessageBox::error(_('Sie müssen den vollständigen Link aus der Bestätigungsmail in die Adresszeile Ihres Browsers kopieren.')); + } + + // abuse (oder Volltrottel) + else { + if (!Token::isValid($secret, User::findCurrent()->id)) { + $error = _('Der übergebene Secret-Code ist nicht korrekt.'); + $details = []; + $details[] = _('Sie müssen unter dem Benutzernamen eingeloggt sein, für den Sie die Bestätigungsmail erhalten haben.'); + $details[] = _('Und Sie müssen den vollständigen Link aus der Bestätigungsmail in die Adresszeile Ihres Browsers kopieren.'); + $message = MessageBox::error($error, $details); + + // Mail an abuse + $REMOTE_ADDR = $_SERVER['REMOTE_ADDR']; + $Zeit = date("H:i:s, d.m.Y", time()); + $username = User::findCurrent()->username; + StudipMail::sendAbuseMessage("Validation", "Secret falsch\n\nUser: $username\n\nIP: $REMOTE_ADDR\nZeit: $Zeit\n"); + } // alles paletti, Status ändern + else { + $studip_user = User::findCurrent(); + $studip_user->perms = 'autor'; + if (!$studip_user->store()) { + $error = _('Fehler! Bitte wenden Sie sich an den Systemadministrator.'); + $message = MessageBox::error($error); + } else { + $success = _('Ihr Status wurde erfolgreich auf autor gesetzt.
    + Damit dürfen Sie in den meisten Veranstaltungen schreiben, für die Sie sich anmelden.'); + $details = []; + $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($studip_user->id, "autor"); + + auth()->setAuthenticatedUser(\User::build(['user_id' => 'nobody', 'perms' => null])); + + $info = sprintf(_('Die Statusänderung wird erst nach einem erneuten %sLogin%s wirksam!
    + Deshalb wurden Sie jetzt automatisch ausgeloggt.'), + '', + ''); + $message .= MessageBox::info($info); + } + $this->message = $message; + } + } + } } diff --git a/app/controllers/search/globalsearch.php b/app/controllers/search/globalsearch.php index 05fcda2..6901f48 100644 --- a/app/controllers/search/globalsearch.php +++ b/app/controllers/search/globalsearch.php @@ -31,7 +31,7 @@ class Search_GlobalsearchController extends AuthenticatedController PageLayout::addHeadElement('meta', [ 'name' => 'studip-cache-prefix', - 'content' => md5("{$_COOKIE[Seminar_Session::class]}-{$GLOBALS['user']->id}"), + 'content' => md5("{$_COOKIE[$GLOBALS['SESSION_OPTIONS']['name']]}-{$GLOBALS['user']->id}"), ]); PageLayout::setBodyElementId('globalsearch-page'); diff --git a/app/controllers/settings/avatar.php b/app/controllers/settings/avatar.php index 31bd705..067e346 100644 --- a/app/controllers/settings/avatar.php +++ b/app/controllers/settings/avatar.php @@ -5,8 +5,6 @@ class Settings_AvatarController extends AuthenticatedController public function before_filter(&$action, &$args) { parent::before_filter($action, $args); - // Ensure user is logged in - $GLOBALS['auth']->login_if($action !== 'logout' && $GLOBALS['auth']->auth['uid'] === 'nobody'); if (!$GLOBALS['perm']->have_profile_perm('user', User::findCurrent()->id)) { throw new AccessDeniedException(_('Sie dürfen dieses Profil nicht bearbeiten')); @@ -20,4 +18,4 @@ class Settings_AvatarController extends AuthenticatedController $avatar = Avatar::getAvatar($this->user_id); $this->avatar_url = $avatar->getURL(Avatar::NORMAL); } -} \ No newline at end of file +} diff --git a/app/controllers/settings/settings.php b/app/controllers/settings/settings.php index 9cd00c0..294b288 100644 --- a/app/controllers/settings/settings.php +++ b/app/controllers/settings/settings.php @@ -35,9 +35,6 @@ abstract class Settings_SettingsController extends AuthenticatedController parent::before_filter($action, $args); - // Ensure user is logged in - $GLOBALS['auth']->login_if($action !== 'logout' && $GLOBALS['auth']->auth['uid'] === 'nobody'); - // extract username $username = Request::username('username', $GLOBALS['user']->username); $this->user = User::findByUsername($username); @@ -96,23 +93,6 @@ abstract class Settings_SettingsController extends AuthenticatedController } /** - * Adjust url_for so it imitates the parameters behaviour of URLHelper. - * This way you can add parameters by adding an associative array as last - * argument. - * - * @param mixed $to Path segments of the url (String) or url parameters - * (Array) - * @return String Generated url - */ - public function url_for($to = ''/*, ...*/) - { - $arguments = func_get_args(); - $parameters = is_array(end($arguments)) ? array_pop($arguments) : []; - $url = call_user_func_array('parent::url_for', $arguments); - return URLHelper::getURL($url, $parameters); - } - - /** * Gets the default template for an action. * * @param String $action Which action was invoked @@ -224,14 +204,9 @@ abstract class Settings_SettingsController extends AuthenticatedController $should_logout = $action === 'logout' && $this->flash['logout-token'] === Request::get('token'); if ($should_logout) { - $GLOBALS['sess']->delete(); - $GLOBALS['auth']->logout(); + $this->redirect('dispatch.php/logout'); } parent::after_filter($action, $args); - - if ($should_logout) { - $GLOBALS['user']->set_last_action(time() - 15 * 60); - } } } diff --git a/app/controllers/start.php b/app/controllers/start.php index 8231095..b655fc0 100644 --- a/app/controllers/start.php +++ b/app/controllers/start.php @@ -317,7 +317,7 @@ class StartController extends AuthenticatedController public function resend_validation_mail_action() { if ($GLOBALS['perm']->get_perm() === 'user') { - Seminar_Register_Auth::sendValidationMail($GLOBALS['user']); + auth()->sendValidationMail(); PageLayout::postSuccess( _('Die Bestätigungsmail wurde erneut verschickt.') ); @@ -360,13 +360,11 @@ class StartController extends AuthenticatedController $this->redirect('start/edit_mail_address'); return; } - $user = new User($GLOBALS['user']->id); + $user = \User::findCurrent(); $user->Email = $email1; $user->store(); - $GLOBALS['user']->Email = $user->Email; - - Seminar_Register_Auth::sendValidationMail($user); + auth()->sendValidationMail($user); PageLayout::postMessage(MessageBox::success( _('Ihre Mailadresse wurde geändert und die Bestätigungsmail erneut verschickt.') )); diff --git a/app/controllers/terms.php b/app/controllers/terms.php index 679a347..d3a829e 100644 --- a/app/controllers/terms.php +++ b/app/controllers/terms.php @@ -33,7 +33,7 @@ class TermsController extends AuthenticatedController $this->redirectUser(); } else { $_SESSION['logout_ticket'] = get_ticket(); - $this->redirectUser('logout.php'); + $this->redirectUser('dispatch.php/logout'); } } elseif (Request::get('action') === 'denied') { if (trim(Config::get()->TERMS_CONFIG['denial_message'])) { diff --git a/app/controllers/web_migrate.php b/app/controllers/web_migrate.php index 3553f90..bf24e32 100644 --- a/app/controllers/web_migrate.php +++ b/app/controllers/web_migrate.php @@ -12,7 +12,6 @@ class WebMigrateController extends StudipController public function before_filter(&$action, &$args) { - $GLOBALS['auth']->login_if(!$GLOBALS['perm']->have_perm('root')); $GLOBALS['perm']->check('root'); parent::before_filter($action, $args); diff --git a/app/views/admin/autoinsert/index.php b/app/views/admin/autoinsert/index.php index a4a999e..33dfdcf 100644 --- a/app/views/admin/autoinsert/index.php +++ b/app/views/admin/autoinsert/index.php @@ -83,7 +83,7 @@ - + diff --git a/app/views/admin/user/_course_files.php b/app/views/admin/user/_course_files.php index caac81a..f2a9eae 100644 --- a/app/views/admin/user/_course_files.php +++ b/app/views/admin/user/_course_files.php @@ -43,12 +43,12 @@ - + veranstaltungsnummer) ?> - + name) ?> diff --git a/app/views/admin/user/_course_list.php b/app/views/admin/user/_course_list.php index a7e090b..9250d7c 100644 --- a/app/views/admin/user/_course_list.php +++ b/app/views/admin/user/_course_list.php @@ -38,12 +38,12 @@ - + course->veranstaltungsnummer) ?> - + course->name) ?> diff --git a/app/views/admin/user/_priority_list.php b/app/views/admin/user/_priority_list.php index e835a88..acb2ca0 100644 --- a/app/views/admin/user/_priority_list.php +++ b/app/views/admin/user/_priority_list.php @@ -31,12 +31,12 @@ - + veranstaltungsnummer) ?> - + getFullName('type-name')), htmlReady($course->getFullName('sem-duration-name'))) ?> diff --git a/app/views/admin/user/_waiting_list.php b/app/views/admin/user/_waiting_list.php index 1fd0724..d4b306e 100644 --- a/app/views/admin/user/_waiting_list.php +++ b/app/views/admin/user/_waiting_list.php @@ -32,12 +32,12 @@ - + course->veranstaltungsnummer) ?> - + course->getFullName('type-name')), htmlReady($membership->course->getFullName('sem-duration-name'))) ?> diff --git a/app/views/api/oauth2/authorize.php b/app/views/api/oauth2/authorize.php index 57d4ef6..f1bf2b0 100644 --- a/app/views/api/oauth2/authorize.php +++ b/app/views/api/oauth2/authorize.php @@ -50,7 +50,7 @@ ) ?>

    -
    +
    + + + + + + + \ No newline at end of file diff --git a/app/views/login/_standard_loginform.php b/app/views/login/_standard_loginform.php new file mode 100644 index 0000000..4221dcd --- /dev/null +++ b/app/views/login/_standard_loginform.php @@ -0,0 +1,69 @@ +USERNAME_TOOLTIP_TEXT; +$password_tooltip_text = (string) Config::get()->PASSWORD_TOOLTIP_TEXT; +?> + +
    > +
    + + + + + + + + + + +
    + ENABLE_REQUEST_NEW_PASSWORD_BY_USER && in_array('Standard', $GLOBALS['STUDIP_AUTH_PLUGIN'])): ?> + + + "> + + + + + + + + + +
    diff --git a/app/views/login/activate_email.php b/app/views/login/activate_email.php new file mode 100644 index 0000000..366990a --- /dev/null +++ b/app/views/login/activate_email.php @@ -0,0 +1,39 @@ + +
    +
    + + + + + + +
    + +
    +
    + + +
    +
    + + + + + + + +
    + +
    +
    + diff --git a/app/views/login/index.php b/app/views/login/index.php new file mode 100644 index 0000000..b1b3dfa --- /dev/null +++ b/app/views/login/index.php @@ -0,0 +1,156 @@ +getURL(); + } else { + $bg_desktop = URLHelper::getURL('pictures/loginbackgrounds/1.jpg'); + } + $bg_mobile = LoginBackground::getRandomPicture('mobile'); + if ($bg_mobile) { + $bg_mobile = $bg_mobile->getURL(); + } else { + $bg_mobile = URLHelper::getURL('pictures/loginbackgrounds/2.jpg'); + } +} else { + $bg_desktop = URLHelper::getURL('pictures/loginbackgrounds/1.jpg'); + $bg_mobile = URLHelper::getURL('pictures/loginbackgrounds/2.jpg'); +} +$show_login = !(current(StudipAuthAbstract::getInstance()) instanceof StudipAuthSSO) && StudipAuthAbstract::isLoginEnabled(); +$show_hidden_login = !$show_login && StudipAuthAbstract::isLoginEnabled(); +$enable_faq = Config::get()->LOGIN_FAQ_VISIBILITY && count($faq_entries) > 0; +$enable_news = Config::get()->LOGIN_NEWS_VISIBILITY && count($news_entries) > 0; +?> +
    +
    +
    + +
    + +
    +
    +
    +

    +
    + + render_partial('login/_standard_loginform', [ + 'hidden' => false, + 'login_form_class' => 'login-top' + ]) ?> + + + + + render_partial('login/_standard_loginform', [ + 'hidden' => empty($loginerror), + 'login_form_class' => 'login-bottom' + ]) ?> + + +
    + +
    + +
    +
    + +
    + + + +
    + + +
    + render_partial('login/_login_faq', [ + 'faq_entries' => $faq_entries, + ]) ?> +
    + + +
    + render_partial('login/_login_news', [ + 'news_entries' => $news_entries, + 'enable_faq' => $enable_faq + ]) ?> +
    + +
    +
    +
    +
    + + diff --git a/app/views/login/privacy_info.php b/app/views/login/privacy_info.php new file mode 100644 index 0000000..556451f --- /dev/null +++ b/app/views/login/privacy_info.php @@ -0,0 +1,216 @@ + +
    + + +
    +

    + +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     
             
             
             
             
             
             
             
             
             
             
    Beiträgen, Dateien, ...') ?>         
             
    Ankündigungen,... habe ich gelesen?') ?>         
    + +

    + + + + + + + + + + + + + + +
     
     
     
    + +
    +
    diff --git a/app/views/my_courses/groups.php b/app/views/my_courses/groups.php index 689f51b..ee9b964 100644 --- a/app/views/my_courses/groups.php +++ b/app/views/my_courses/groups.php @@ -47,7 +47,7 @@ - + IMPORTANT_SEMNUMBER ? $my_sem[$member['seminar_id']]['veranstaltungsnummer'] : '') ?> diff --git a/app/views/my_studygroups/_course.php b/app/views/my_studygroups/_course.php index 87af045..37c081e 100644 --- a/app/views/my_studygroups/_course.php +++ b/app/views/my_studygroups/_course.php @@ -5,7 +5,7 @@ getImageTag(Avatar::SMALL, ['title' => $group['name']]) ?> - > @@ -28,8 +28,8 @@ isVisible(true)) : ?>
  • hasBadgeNumber() ? 'class="badge" data-badge-number="' . intval($nav->getBadgeNumber()) . '"' : '' ?>> getImage()->asImg($nav->getLinkAttributes()) ?> @@ -56,7 +56,7 @@ - + asImg(['title' => _('Die Teilnahme ist bindend. Bitte wenden Sie sich an die Lehrenden.')]) ?>   - + @@ -68,7 +68,7 @@ $badge = ' class="badge" data-badge-number="' . intval($navigation->getBadgeNumber()) . '"'; } ?> - > + > getImage()->asImg($navigation->getLinkAttributes()) ?> diff --git a/app/views/questionnaire/context.php b/app/views/questionnaire/context.php index 96190d9..36953a6 100644 --- a/app/views/questionnaire/context.php +++ b/app/views/questionnaire/context.php @@ -38,7 +38,7 @@