diff --git a/apps/server/src/modules/learnroom/service/board-copy.service.ts b/apps/server/src/modules/learnroom/service/board-copy.service.ts index 5da5291956d..f8a6bb3c5d8 100644 --- a/apps/server/src/modules/learnroom/service/board-copy.service.ts +++ b/apps/server/src/modules/learnroom/service/board-copy.service.ts @@ -43,28 +43,28 @@ export class BoardCopyService { private readonly copyHelperService: CopyHelperService ) {} -async copyBoard(params: BoardCopyParams): Promise { - const { originalBoard, user, destinationCourse } = params; - - const boardElements: BoardElement[] = originalBoard.getElements(); - const elements: CopyStatus[] = await this.copyBoardElements(boardElements, user, destinationCourse); - const references: BoardElement[] = this.extractReferences(elements); - - let boardCopy: Board = new Board({ references, course: destinationCourse }); - - let status: CopyStatus = { - title: 'board', - type: CopyElementType.BOARD, - status: this.copyHelperService.deriveStatusFromElements(elements), - copyEntity: boardCopy, - originalEntity: params.originalBoard, - elements, - }; - - status = this.updateCopiedEmbeddedTasksOfLessons(status); - if (status.copyEntity) { - boardCopy = status.copyEntity as Board; - } + async copyBoard(params: BoardCopyParams): Promise { + const { originalBoard, user, destinationCourse } = params; + + const boardElements: BoardElement[] = originalBoard.getElements(); + const elements: CopyStatus[] = await this.copyBoardElements(boardElements, user, destinationCourse); + const references: BoardElement[] = this.extractReferences(elements); + + let boardCopy: Board = new Board({ references, course: destinationCourse }); + + let status: CopyStatus = { + title: 'board', + type: CopyElementType.BOARD, + status: this.copyHelperService.deriveStatusFromElements(elements), + copyEntity: boardCopy, + originalEntity: params.originalBoard, + elements, + }; + + status = this.updateCopiedEmbeddedTasksOfLessons(status); + if (status.copyEntity) { + boardCopy = status.copyEntity as Board; + } try { await this.boardRepo.save(boardCopy); diff --git a/apps/server/src/modules/learnroom/service/course-copy.service.ts b/apps/server/src/modules/learnroom/service/course-copy.service.ts index 7a1bb1b93a7..e2a2ad15c5e 100644 --- a/apps/server/src/modules/learnroom/service/course-copy.service.ts +++ b/apps/server/src/modules/learnroom/service/course-copy.service.ts @@ -120,6 +120,4 @@ export class CourseCopyService { }; return status; } - - } diff --git a/apps/server/src/modules/lesson/service/lesson-copy.service.ts b/apps/server/src/modules/lesson/service/lesson-copy.service.ts index 2e3dc7db872..16f33c20bac 100644 --- a/apps/server/src/modules/lesson/service/lesson-copy.service.ts +++ b/apps/server/src/modules/lesson/service/lesson-copy.service.ts @@ -236,7 +236,7 @@ export class LessonCopyService { status: CopyStatusEnum.PARTIAL, }; if (nexboardContent) { - nexboardStatus.status = CopyStatusEnum.FAIL; + nexboardStatus.status = CopyStatusEnum.NOT_DOING; } copiedContentStatus.push(nexboardStatus); }