diff options
| author | Rasmus Fuhse <fuhse@data-quest.de> | 2025-01-10 12:13:24 +0000 |
|---|---|---|
| committer | Rasmus Fuhse <fuhse@data-quest.de> | 2025-01-10 12:13:24 +0000 |
| commit | 39745c9aa8bb099e8bda1f4d775ed229dbe97be4 (patch) | |
| tree | a2a96deecf48e62d995507c5c8b39eea9ae9293d /app/controllers/my_courses.php | |
| parent | 03e8e1d8f9100cf9bfcb111b63ac4077f510a026 (diff) | |
Resolve "Studiengruppen erweitern" - Hauptbronch
Closes #3616
Merge request studip/studip!2509
Diffstat (limited to 'app/controllers/my_courses.php')
| -rw-r--r-- | app/controllers/my_courses.php | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/app/controllers/my_courses.php b/app/controllers/my_courses.php index c7a6771..a8d9797 100644 --- a/app/controllers/my_courses.php +++ b/app/controllers/my_courses.php @@ -704,17 +704,19 @@ class MyCoursesController extends AuthenticatedController } } - $groups[] = [ - 'id' => $_outer_index, - 'name' => (string) $sem_data[$_outer_index]['name'], - 'data' => [ - [ - 'id' => md5($_outer_index), - 'label' => false, - 'ids' => array_keys($_courses), + if ($_outer_index) { + $groups[] = [ + 'id' => $_outer_index, + 'name' => (string)$sem_data[$_outer_index]['name'], + 'data' => [ + [ + 'id' => md5($_outer_index), + 'label' => false, + 'ids' => array_keys($_courses), + ], ], - ], - ]; + ]; + } $temp_courses = array_merge($temp_courses, $_courses); } else { $count = 1; @@ -747,11 +749,13 @@ class MyCoursesController extends AuthenticatedController $temp_courses = array_merge($temp_courses, $_courses); } - $groups[] = [ - 'id' => $_outer_index, - 'name' => (string) $sem_data[$_outer_index]['name'], - 'data' => $_groups, - ]; + if ($_outer_index) { + $groups[] = [ + 'id' => $_outer_index, + 'name' => (string)$sem_data[$_outer_index]['name'], + 'data' => $_groups, + ]; + } } } } |
