From d158072669339959c0990e01888f75ebf5850007 Mon Sep 17 00:00:00 2001
From: Rasmus Fuhse <fuhse@data-quest.de>
Date: Thu, 30 Nov 2023 09:11:38 +0000
Subject: [PATCH] Resolve "Admin-Veranstaltungen: Filter nach Typen geht nicht"

Closes #3520

Merge request studip/studip!2404
---
 lib/classes/AdminCourseFilter.class.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/classes/AdminCourseFilter.class.php b/lib/classes/AdminCourseFilter.class.php
index a934ebe6680..da8ce54f7e0 100644
--- a/lib/classes/AdminCourseFilter.class.php
+++ b/lib/classes/AdminCourseFilter.class.php
@@ -126,7 +126,7 @@ class AdminCourseFilter
         }
 
         if ($GLOBALS['user']->cfg->MY_COURSES_TYPE_FILTER && $GLOBALS['user']->cfg->MY_COURSES_TYPE_FILTER !== 'all') {
-            if (str_contains(Request::option('course_type'), '_')) {
+            if (str_contains($GLOBALS['user']->cfg->MY_COURSES_TYPE_FILTER, '_')) {
                 list($sem_class_id, $sem_type_id) = explode('_', $GLOBALS['user']->cfg->MY_COURSES_TYPE_FILTER);
                 $this->query->where('course_type', 'seminare.status = :course_type', ['course_type' => $sem_type_id]);
             } else {
-- 
GitLab