From 4c7c91b1f6c6f49e549ebb3d3ded2197b75ec4b3 Mon Sep 17 00:00:00 2001 From: Rajnish Dargan Date: Tue, 24 Dec 2024 16:47:22 +0530 Subject: [PATCH] Issue #PS-2840 feat: Changes to support multi-framework capabilites in Course Editor --- src/components/CollectionEditor.tsx | 4 ++-- src/services/ContentService.ts | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/CollectionEditor.tsx b/src/components/CollectionEditor.tsx index 00fb512..c0e3013 100644 --- a/src/components/CollectionEditor.tsx +++ b/src/components/CollectionEditor.tsx @@ -162,7 +162,7 @@ const CollectionEditor: React.FC = () => { script.id = "collection-editor-js"; script.src = - "https://cdn.jsdelivr.net/npm/@project-sunbird/sunbird-collection-editor-web-component@latest/sunbird-collection-editor.js"; + "https://cdn.jsdelivr.net/npm/@tekdi/sunbird-collection-editor-web-component@6.1.0-beta.0/sunbird-collection-editor.js"; script.async = true; script.onload = () => setAssetsLoaded(true); document.body.appendChild(script); @@ -177,7 +177,7 @@ const CollectionEditor: React.FC = () => { link.id = "collection-editor-css"; link.rel = "stylesheet"; link.href = - "https://cdn.jsdelivr.net/npm/@project-sunbird/sunbird-collection-editor-web-component@latest/styles.css"; + "https://cdn.jsdelivr.net/npm/@tekdi/sunbird-collection-editor-web-component@6.1.0-beta.0/styles.css"; document.head.appendChild(link); } diff --git a/src/services/ContentService.ts b/src/services/ContentService.ts index bbb1926..5157dd5 100644 --- a/src/services/ContentService.ts +++ b/src/services/ContentService.ts @@ -9,6 +9,7 @@ import { CHANNEL_ID, TENANT_ID, FRAMEWORK_ID, + CONTENT_FRAMEWORK_ID } from "@/utils/app.config"; import { v4 as uuidv4 } from "uuid"; import { PrimaryCategoryValue, Role } from "@/utils/app.constant"; @@ -244,7 +245,8 @@ export const createCourse = async (userId: any) => { resourceType: "Course", primaryCategory: "Course", contentType: "Course", - framework: FRAMEWORK_ID, + framework: CONTENT_FRAMEWORK_ID, + targetFWIds: [FRAMEWORK_ID] }, }, };