aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndré Noack <noack@data-quest.de>2024-05-06 08:54:08 +0000
committerDavid Siegfried <david.siegfried@uni-vechta.de>2024-05-06 08:54:08 +0000
commita944dacedff6511310d1c73b9854b450ed8996b2 (patch)
tree836bec649807028e6e19a42f150e6a5b5a5676c7 /lib
parentc659d71e33cecbe42a7038c281c082f4b5c98414 (diff)
Resolve "Verwaltung von Veranstaltungen: Einrichtungsfilter filtert bei "Fakultät + Institute" nur auf die Fakultät"
Closes #4108 Merge request studip/studip!2954
Diffstat (limited to 'lib')
-rw-r--r--lib/classes/AdminCourseFilter.class.php12
1 files changed, 1 insertions, 11 deletions
diff --git a/lib/classes/AdminCourseFilter.class.php b/lib/classes/AdminCourseFilter.class.php
index 3b9cb4b..f643e09 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) {