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(