diff --git a/modules/clas/src/main/ClasApi.scala b/modules/clas/src/main/ClasApi.scala index b37969700376e..8f494960682c6 100644 --- a/modules/clas/src/main/ClasApi.scala +++ b/modules/clas/src/main/ClasApi.scala @@ -260,7 +260,11 @@ final class ClasApi( def move(s: Student.WithUser, toClas: Clas)(using teacher: Me): Fu[Option[Student]] = for _ <- closeAccount(s) - stu = s.student.copy(id = Student.makeId(s.user.id, toClas.id), clasId = toClas.id) + stu = s.student.copy( + id = Student.makeId(s.user.id, toClas.id), + clasId = toClas.id, + created = Clas.Recorded(by = teacher.userId, at = nowInstant) + ) moved <- colls.student.insert .one(stu) .inject(stu.some)