Skip to content

Commit

Permalink
Merge pull request #153 from rajnishdargan/release-1.1.0
Browse files Browse the repository at this point in the history
Issue #PS-2876 feat: Integration of Learning Framework for content creation
  • Loading branch information
itsvick authored Dec 20, 2024
2 parents d3a319f + 0fabf64 commit 9450249
Show file tree
Hide file tree
Showing 4 changed files with 166 additions and 106 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ NEXT_PUBLIC_TENANT_ID="" # Tenant Id of User
NEXT_PUBLIC_CLOUD_STORAGE_URL="" # Use environment variable for S3 Cloud Storage URL - should have / at the end.
NEXT_PUBLIC_CHANNEL_ID="" # Channel Id of knowlg-inQuiry setup
NEXT_PUBLIC_FRAMEWORK_ID="" # Framework Id of knowlg-inQuiry setup
NEXT_PUBLIC_CONTENT_FRAMEWORK_ID="" # Learning Framework Id for Content Creation
NEXT_PUBLIC_TELEMETRY_URL="" #telemetry service path
AWS_ACCESS_KEY_ID="" # For AWS S3 large file chunks upload
AWS_ACCESS_SECRET_KEY="" # For AWS S3 large file chunks upload
Expand Down
4 changes: 2 additions & 2 deletions src/components/GenericEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'izimodal/css/iziModal.css';
import 'izimodal/js/iziModal.js';
import editorConfig from './editor.config.json';
import { getLocalStoredUserId, getLocalStoredUserName } from "@/services/LocalStorageService";
import { CHANNEL_ID, FRAMEWORK_ID, TENANT_ID } from "@/utils/app.config";
import { CHANNEL_ID, CONTENT_FRAMEWORK_ID, TENANT_ID } from "@/utils/app.config";

const GenericEditor: React.FC = () => {
const router = useRouter();
Expand Down Expand Up @@ -136,7 +136,7 @@ const GenericEditor: React.FC = () => {
window['context'].contextRollUp.l1 = CHANNEL_ID;
window['context'].tags = [CHANNEL_ID];
window['context'].channel = CHANNEL_ID;
window['context'].framework = FRAMEWORK_ID;
window['context'].framework = CONTENT_FRAMEWORK_ID;
if (isLargeFileUpload || (_.get(data, 'contentDisposition') === 'online-only')) {
window.context['uploadInfo'] = {
isLargeFileUpload: true
Expand Down
262 changes: 158 additions & 104 deletions src/pages/api/mocked-response.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,29 +71,33 @@ export const genericEditorSaveFormResponse = {
"visible": true
},
{
"code": "audience",
"code": "primaryUser",
"dataType": "list",
"description": "Audience",
"description": "Primary User",
"editable": true,
"index": 5,
"inputType": "multiselect",
"label": "Audience",
"name": "Audience",
"label": "Primary User",
"name": "Primary User",
"range": [
{
"key": "Student",
"name": "Student"
"key": "Parents",
"name": "Parents"
},
{
"key": "Teacher",
"name": "Teacher"
"key": "Educators",
"name": "Educators"
},
{
"key": "Administrator",
"name": "Administrator"
"key": "Children",
"name": "Children"
},
{
"key": "Volunteer",
"name": "Volunteer"
}
],
"placeholder": "Select Audience",
"placeholder": "Select Primary User",
"renderingHints": {},
"required": false,
"visible": true
Expand Down Expand Up @@ -183,140 +187,190 @@ export const genericEditorReviewFormResponse = {
"visible": true
},
{
"code": "state",
"code": "learningCategory",
"visible": true,
"depends": [
"board",
"medium",
"gradeLevel",
"courseType",
"subject",
"topic"
"learningCategorySubset"
],
"editable": true,
"dataType": "text",
"renderingHints": {},
"description": "State",
"description": "Learning Category",
"index": 5,
"label": "State",
"label": "Learning Category",
"required": true,
"name": "State",
"name": "Learning Category",
"inputType": "select",
"placeholder": "State"
"placeholder": "Select Learning Category"
},
{
"code": "board",
"code": "learningCategorySubset",
"visible": true,
"depends": [
"medium",
"gradeLevel",
"courseType",
"subject"
],
"editable": true,
"dataType": "text",
"renderingHints": {},
"description": "Board",
"description": "Learning Category Subset",
"index": 6,
"label": "Board/Syllabus",
"label": "Learning Category Subset",
"required": true,
"name": "Board/Syllabus",
"name": "Learning Category Subset",
"inputType": "select",
"placeholder": "Select Board/Syllabus"
"placeholder": "Learning Category Subset"
},
{
"code": "medium",
"visible": true,
"depends": [
"gradeLevel",
"courseType",
"subject"
],
"editable": true,
"code": "targetAgeGroup",
"dataType": "list",
"renderingHints": {},
"description": "",
"description": "Target Age group / Grade level (Who is the content targeted for?)",
"editable": true,
"index": 7,
"label": "Medium",
"required": true,
"name": "medium",
"inputType": "multiselect",
"placeholder": "Select Medium"
},
{
"code": "gradeLevel",
"visible": true,
"depends": [
"courseType",
"subject"
"label": "Target Age group",
"name": "Target Age group",
"range": [
{
"key": "0-3 Years",
"name": "0-3 Years"
},
{
"key": "3-6 Years",
"name": "3-6 Years"
},
{
"key": "6-8 Years",
"name": "6-8 Years"
},
{
"key": "8-11 Years",
"name": "8-11 Years"
},
{
"key": "11-14 Years",
"name": "11-14 Years"
},
{
"key": "14-18 Years",
"name": "14-18 Years"
},
{
"key": "18 and above",
"name": "18 and above"
}
],
"editable": true,
"dataType": "list",
"placeholder": "Target Age group",
"renderingHints": {},
"description": "Class",
"index": 8,
"label": "Class",
"required": true,
"name": "Class",
"inputType": "multiselect",
"placeholder": "Select Class"
"required": false,
"visible": true
},
{
"code": "courseType",
"visible": true,
"depends": [
"subject"
],
"editable": true,
"code": "primaryUser",
"dataType": "list",
"renderingHints": {},
"description": "",
"index": 9,
"label": "Course Type",
"required": true,
"name": "Course Type",
"inputType": "multiselect",
"placeholder": "Course Type"
},
{
"code": "subject",
"visible": true,
"depends": [],
"description": "Primary User",
"editable": true,
"dataType": "list",
"renderingHints": {},
"description": "",
"index": 10,
"label": "Subject",
"required": true,
"name": "Subject",
"index": 8,
"inputType": "multiselect",
"placeholder": "Select Subject"
"label": "Primary User",
"name": "Primary User",
"range": [
{
"key": "Parents",
"name": "Parents"
},
{
"key": "Educators",
"name": "Educators"
},
{
"key": "Children",
"name": "Children"
},
{
"key": "Volunteer",
"name": "Volunteer"
}
],
"placeholder": "Select Primary User",
"renderingHints": {},
"required": false,
"visible": true
},
{
"code": "audience",
"dataType": "list",
"description": "Audience",
"code": "mediumOfLearning",
"dataType": "text",
"description": "Medium of Learning",
"editable": true,
"index": 11,
"inputType": "multiselect",
"label": "Audience",
"name": "Audience",
"index": 8,
"inputType": "select",
"label": "Medium of Learning",
"name": "Medium of Learning",
"range": [
{
"key": "Student",
"name": "Student"
"key": "Hindi",
"name": "Hindi"
},
{
"key": "English",
"name": "English"
},
{
"key": "Urdu",
"name": "Urdu"
},
{
"key": "Teacher",
"name": "Teacher"
"key": "Sanskrit",
"name": "Sanskrit"
},
{
"key": "Administrator",
"name": "Administrator"
"key": "Punjabi",
"name": "Punjabi"
},
{
"key": "Gujarati",
"name": "Gujarati"
},
{
"key": "Marathi",
"name": "Marathi"
},
{
"key": "Tamil",
"name": "Tamil"
},
{
"key": "Telugu",
"name": "Telugu"
},
{
"key": "Kannada",
"name": "Kannada"
},
{
"key": "Malayalam",
"name": "Malayalam"
},
{
"key": "Odia",
"name": "Odia"
},
{
"key": "Assamese",
"name": "Assamese"
},
{
"key": "Bengali",
"name": "Bengali"
},
{
"key": "Manipuri",
"name": "Manipuri"
},
{
"key": "Kashmiri",
"name": "Kashmiri"
}
],
"placeholder": "Select Audience",
"placeholder": "Medium of Learning",
"renderingHints": {},
"required": false,
"visible": true
Expand All @@ -326,7 +380,7 @@ export const genericEditorReviewFormResponse = {
"dataType": "text",
"description": "Indicate if this should be visible on open school",
"editable": true,
"index": 12,
"index": 9,
"inputType": "select",
"label": "Show on open school?",
"name": "Open School Visibility",
Expand All @@ -350,7 +404,7 @@ export const genericEditorReviewFormResponse = {
"dataType": "text",
"description": "Program",
"editable": true,
"index": 13,
"index": 10,
"inputType": "select",
"label": "Program",
"name": "Program",
Expand Down
5 changes: 5 additions & 0 deletions src/utils/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ if (!FRAMEWORK_ID) {
console.warn('NEXT_PUBLIC_FRAMEWORK_ID is not set in the environment variables.');
}

export const CONTENT_FRAMEWORK_ID = process.env.NEXT_PUBLIC_CONTENT_FRAMEWORK_ID || "";
if (!CONTENT_FRAMEWORK_ID) {
console.warn('NEXT_PUBLIC_CONTENT_FRAMEWORK_ID is not set in the environment variables.');
}

export const CLOUD_STORAGE_URL = process.env.NEXT_PUBLIC_CLOUD_STORAGE_URL || "";
if (!CLOUD_STORAGE_URL) {
console.warn('NEXT_PUBLIC_CLOUD_STORAGE_URL is not set in the environment variables.');
Expand Down

0 comments on commit 9450249

Please sign in to comment.