From 7ec99a4e158f741639e846178269d7f280999276 Mon Sep 17 00:00:00 2001
From: Jan-Hendrik Willms <tleilax+studip@gmail.com>
Date: Fri, 14 Oct 2022 12:22:08 +0000
Subject: [PATCH] ensure correct array encoding, fixes #1668

Closes #1668

Merge request studip/studip!1078
---
 app/controllers/my_courses.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/controllers/my_courses.php b/app/controllers/my_courses.php
index 0c12f417bb5..7f98f1ba797 100644
--- a/app/controllers/my_courses.php
+++ b/app/controllers/my_courses.php
@@ -187,7 +187,7 @@ class MyCoursesController extends AuthenticatedController
             'user_id' => $GLOBALS['user']->id,
             'config'  => [
                 'allow_dozent_visibility'  => Config::get()->ALLOW_DOZENT_VISIBILITY,
-                'open_groups'              => $GLOBALS['user']->cfg->MY_COURSES_OPEN_GROUPS,
+                'open_groups'              => array_values($GLOBALS['user']->cfg->MY_COURSES_OPEN_GROUPS),
                 'sem_number'               => Config::get()->IMPORTANT_SEMNUMBER,
                 'allow_tiled_display'      => Config::get()->MY_COURSES_ALLOW_TILED_DISPLAY,
                 'display_type'             => Config::get()->MY_COURSES_ALLOW_TILED_DISPLAY && $GLOBALS['user']->cfg->MY_COURSES_TILED_DISPLAY ? 'tiles' : 'tables',
-- 
GitLab