From 3c62bf03b89bb68f92cbc2cba662d06b679c0b56 Mon Sep 17 00:00:00 2001 From: MajedAlaitwniCap Date: Tue, 29 Oct 2024 14:08:51 +0100 Subject: [PATCH] remove redundant title from cards after export --- .../common-cartridge/import/common-cartridge-import.types.ts | 2 +- .../learnroom/mapper/common-cartridge-export.mapper.ts | 4 ++-- .../learnroom/mapper/common-cartridge-import.mapper.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/server/src/modules/common-cartridge/import/common-cartridge-import.types.ts b/apps/server/src/modules/common-cartridge/import/common-cartridge-import.types.ts index ce86755bb60..8e1393b32c2 100644 --- a/apps/server/src/modules/common-cartridge/import/common-cartridge-import.types.ts +++ b/apps/server/src/modules/common-cartridge/import/common-cartridge-import.types.ts @@ -10,7 +10,7 @@ export type CommonCartridgeFileParserOptions = { export const DEFAULT_FILE_PARSER_OPTIONS: CommonCartridgeFileParserOptions = { maxSearchDepth: 5, pathSeparator: '/', - inputFormat: InputFormat.RICH_TEXT_CK5, + inputFormat: InputFormat.RICH_TEXT_CK4, }; export type CommonCartridgeOrganizationProps = { diff --git a/apps/server/src/modules/learnroom/mapper/common-cartridge-export.mapper.ts b/apps/server/src/modules/learnroom/mapper/common-cartridge-export.mapper.ts index 989d230c3eb..30d9c7f7289 100644 --- a/apps/server/src/modules/learnroom/mapper/common-cartridge-export.mapper.ts +++ b/apps/server/src/modules/learnroom/mapper/common-cartridge-export.mapper.ts @@ -65,7 +65,7 @@ export class CommonCartridgeExportMapper { type: CommonCartridgeResourceType.WEB_CONTENT, identifier: createIdentifier(task.id), title: task.name, - html: `

${task.name}

${task.description}

`, + html: `

${task.description}

`, intendedUse, }; } @@ -79,7 +79,7 @@ export class CommonCartridgeExportMapper { type: CommonCartridgeResourceType.WEB_CONTENT, identifier: createIdentifier(content._id), title: content.title, - html: `

${content.title}

${content.content.text}

`, + html: `

${content.content.text}

`, intendedUse: CommonCartridgeIntendedUseType.UNSPECIFIED, }; case ComponentType.GEOGEBRA: diff --git a/apps/server/src/modules/learnroom/mapper/common-cartridge-import.mapper.ts b/apps/server/src/modules/learnroom/mapper/common-cartridge-import.mapper.ts index 826186cd4e8..9123610e4f0 100644 --- a/apps/server/src/modules/learnroom/mapper/common-cartridge-import.mapper.ts +++ b/apps/server/src/modules/learnroom/mapper/common-cartridge-import.mapper.ts @@ -69,7 +69,7 @@ export class CommonCartridgeImportMapper { const body = new RichTextContentBody(); body.text = resource.html; - body.inputFormat = InputFormat.RICH_TEXT_CK5_SIMPLE; + body.inputFormat = InputFormat.RICH_TEXT_CK4; return body; }