diff --git a/apps/server/src/modules/common-cartridge/common-cartridge-client/lesson-client/dto/lesson.dto.ts b/apps/server/src/modules/common-cartridge/common-cartridge-client/lesson-client/dto/lesson.dto.ts index 69935291c5..1385d6136e 100644 --- a/apps/server/src/modules/common-cartridge/common-cartridge-client/lesson-client/dto/lesson.dto.ts +++ b/apps/server/src/modules/common-cartridge/common-cartridge-client/lesson-client/dto/lesson.dto.ts @@ -19,7 +19,7 @@ export class LessonDto { public materials: LessonMaterialsDto[]; - public linkedTasks?: LessonLinkedTaskDto[]; + public linkedTasks: LessonLinkedTaskDto[]; constructor(props: LessonDto) { this.lessonId = props.lessonId; diff --git a/apps/server/src/modules/common-cartridge/common-cartridge-client/lesson-client/mapper/lesson-dto.mapper.ts b/apps/server/src/modules/common-cartridge/common-cartridge-client/lesson-client/mapper/lesson-dto.mapper.ts index a587c98459..aeeeba2cf3 100644 --- a/apps/server/src/modules/common-cartridge/common-cartridge-client/lesson-client/mapper/lesson-dto.mapper.ts +++ b/apps/server/src/modules/common-cartridge/common-cartridge-client/lesson-client/mapper/lesson-dto.mapper.ts @@ -50,6 +50,7 @@ export class LessonDtoMapper { contents: lessonResponse.contents .map((content) => this.mapToLessenContentDto(content)) .filter((contetnDto) => contetnDto !== null), + linkedTasks: [], materials: lessonResponse.materials.map((material) => this.mapToLessonMaterialDto(material)), }); diff --git a/apps/server/src/modules/common-cartridge/service/common-cartridge-export.service.spec.ts b/apps/server/src/modules/common-cartridge/service/common-cartridge-export.service.spec.ts index ffc209887a..769de8f23e 100644 --- a/apps/server/src/modules/common-cartridge/service/common-cartridge-export.service.spec.ts +++ b/apps/server/src/modules/common-cartridge/service/common-cartridge-export.service.spec.ts @@ -185,7 +185,7 @@ describe('CommonCartridgeExportService', () => { const { archive, lesson } = await setup(); const manifest = archive.getEntry('imsmanifest.xml')?.getData().toString(); - lesson.linkedTasks?.forEach((linkedTask) => { + lesson.linkedTasks.forEach((linkedTask) => { expect(manifest).toContain(`