diff options
| author | André Noack <noack@data-quest.de> | 2024-05-06 08:54:08 +0000 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+github@gmail.com> | 2024-05-06 15:14:52 +0200 |
| commit | 1766aa5b8af2b0cbc077797227d12ea216d7c69a (patch) | |
| tree | 31ccade10480f3eef64150ef80e5b541958bd467 /lib/classes/AdminCourseFilter.class.php | |
| parent | 74426eb9392b099b3c7271bcbda21e32946a095f (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/classes/AdminCourseFilter.class.php')
| -rw-r--r-- | lib/classes/AdminCourseFilter.class.php | 12 |
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) { |
