aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Noack <noack@data-quest.de>2025-01-06 08:36:05 +0000
committerAndré Noack <noack@data-quest.de>2025-01-06 08:36:05 +0000
commit7cd72d0cbef2f2549240ed34098e58d6e5e89acb (patch)
tree2e6055a0ffcc356b2203f5957ec8593e8508d41d
parentfd3abc4f8c466e3ec396999289ba6f4b7b1bb833 (diff)
Resolve #5087 "Meine Veranstaltungen verlinkt noch auf seminar_main.php"
Closes #5087 Merge request studip/studip!3802
-rw-r--r--app/controllers/course/go.php4
-rw-r--r--app/controllers/institute/overview.php13
-rw-r--r--resources/vue/components/MyCoursesTables.vue2
-rw-r--r--resources/vue/components/MyCoursesTiles.vue2
-rw-r--r--resources/vue/mixins/MyCoursesMixin.js2
5 files changed, 14 insertions, 9 deletions
diff --git a/app/controllers/course/go.php b/app/controllers/course/go.php
index 03ae1df..400c44a 100644
--- a/app/controllers/course/go.php
+++ b/app/controllers/course/go.php
@@ -50,7 +50,9 @@ class Course_GoController extends AuthenticatedController
if (!is_internal_url($redirect_to)) {
throw new Exception('Invalid redirection');
}
-
+ if (str_starts_with($redirect_to, '#')) {
+ $redirect_to = 'dispatch.php/course/go' . $redirect_to;
+ }
$this->redirect(URLHelper::getURL($redirect_to, ['cid' => $course_id]));
return;
}
diff --git a/app/controllers/institute/overview.php b/app/controllers/institute/overview.php
index 3713dcc..db83115 100644
--- a/app/controllers/institute/overview.php
+++ b/app/controllers/institute/overview.php
@@ -16,17 +16,20 @@ class Institute_OverviewController extends AuthenticatedController
{
protected $allow_nobody = true;
- function before_filter(&$action, &$args) {
-
+ public function __construct(\Trails\Dispatcher $dispatcher)
+ {
+ if (Request::option('auswahl')) {
+ Request::set('cid', Request::option('auswahl'));
+ }
//Check if anonymous access is really allowed:
$config = Config::get();
if (($config->ENABLE_FREE_ACCESS && ($config->ENABLE_FREE_ACCESS == 'courses_only'))) {
$this->allow_nobody = false;
}
+ parent::__construct($dispatcher);
+ }
- if (Request::option('auswahl')) {
- Request::set('cid', Request::option('auswahl'));
- }
+ public function before_filter(&$action, &$args) {
parent::before_filter($action, $args);
diff --git a/resources/vue/components/MyCoursesTables.vue b/resources/vue/components/MyCoursesTables.vue
index 0bf9423..e3b70ea 100644
--- a/resources/vue/components/MyCoursesTables.vue
+++ b/resources/vue/components/MyCoursesTables.vue
@@ -56,7 +56,7 @@
{{ course.number }}
</td>
<td :class="{'subcourse-indented': isChild(course)}">
- <a :href="urlFor('seminar_main.php', {to: course.id})">
+ <a :href="urlFor('dispatch.php/course/go', {to: course.id})">
{{ getCourseName(course, getConfig('sem_number') && responsiveDisplay) }}
<span v-if="course.is_deputy">{{ $gettext('[Vertretung]') }}</span>
</a>
diff --git a/resources/vue/components/MyCoursesTiles.vue b/resources/vue/components/MyCoursesTiles.vue
index 81e0237..355d24c 100644
--- a/resources/vue/components/MyCoursesTiles.vue
+++ b/resources/vue/components/MyCoursesTiles.vue
@@ -24,7 +24,7 @@
></studip-action-menu>
</span>
- <a :href="urlFor('seminar_main.php', {to: course.id})" class="tiles-grid-element-header-content" :title="getCourseName(course, getConfig('sem_number'))">
+ <a :href="urlFor('dispatch.php/course/go', {to: course.id})" class="tiles-grid-element-header-content" :title="getCourseName(course, getConfig('sem_number'))">
<span :style="{backgroundImage: `url(${course.avatar})`}" class="tiles-grid-element-header-image"></span>
<span class="tiled-grid-element-header-title">
{{ getCourseName(course, getConfig('sem_number')) }}
diff --git a/resources/vue/mixins/MyCoursesMixin.js b/resources/vue/mixins/MyCoursesMixin.js
index 6b22707..fa28388 100644
--- a/resources/vue/mixins/MyCoursesMixin.js
+++ b/resources/vue/mixins/MyCoursesMixin.js
@@ -141,7 +141,7 @@ export default {
result.icon.role = 'clickable';
}
- result.url = this.urlFor('seminar_main.php', {
+ result.url = this.urlFor('dispatch.php/course/go', {
to: course.id,
redirect_to: result.url,
});