From a9a52c17a1cd55ee5c53fc4e840ef123a3488c19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marvin=20=C3=96hlerking?= Date: Wed, 11 Sep 2024 17:17:46 +0200 Subject: [PATCH] fix course time stamps --- controllers/courses.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/controllers/courses.js b/controllers/courses.js index 00a2b87243..dca04cb06c 100644 --- a/controllers/courses.js +++ b/controllers/courses.js @@ -303,6 +303,11 @@ const editCourseHandler = (req, res, next) => { course.name = group.name; course.teacherIds = getUserIdsByRole(group.users, 'teacher'); course.userIds = getUserIdsByRole(group.users, 'student'); + + if (group.validPeriod) { + course.startDate = timesHelper.fromUTC(group.validPeriod.from); + course.untilDate = timesHelper.fromUTC(group.validPeriod.until); + } } const syncedElements = (course.syncedWithGroup || syncedGroupId) ? getSyncedElements(