From a944dacedff6511310d1c73b9854b450ed8996b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Noack?= <noack@data-quest.de> Date: Mon, 6 May 2024 08:54:08 +0000 Subject: [PATCH] =?UTF-8?q?Resolve=20"Verwaltung=20von=20Veranstaltungen:?= =?UTF-8?q?=20Einrichtungsfilter=20filtert=20bei=20"Fakult=C3=A4t=20+=20In?= =?UTF-8?q?stitute"=20nur=20auf=20die=20Fakult=C3=A4t"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #4108 Merge request studip/studip!2954 --- lib/classes/AdminCourseFilter.class.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/lib/classes/AdminCourseFilter.class.php b/lib/classes/AdminCourseFilter.class.php index 3b9cb4ba6a2..f643e0903fe 100644 --- a/lib/classes/AdminCourseFilter.class.php +++ b/lib/classes/AdminCourseFilter.class.php @@ -86,21 +86,11 @@ class AdminCourseFilter return $a['Institut_id']; }); } else { - //We must check, if the institute ID belongs to a faculty - //and has the string _i appended to it. - //In that case we must display the courses of the faculty - //and all its institutes. - //Otherwise we just display the courses of the faculty. - $include_children = false; $inst_id = $GLOBALS['user']->cfg->MY_INSTITUTES_DEFAULT; - if (str_contains($inst_id, '_')) { - $inst_id = substr($inst_id, 0, strpos($inst_id, '_')); - $include_children = true; - } $inst_ids[] = $inst_id; - if ($include_children) { + if ($GLOBALS['user']->cfg->MY_INSTITUTES_INCLUDE_CHILDREN) { $inst = Institute::find($inst_id); if ($inst && $inst->isFaculty()) { foreach ($inst->sub_institutes->pluck('Institut_id') as $institut_id) { -- GitLab