Skip to content

Commit

Permalink
Issue #ED-2854 fix: Removing diksha specific hardcoding
Browse files Browse the repository at this point in the history
  • Loading branch information
rajnishdargan committed Sep 12, 2023
1 parent 4917bd9 commit 882b0da
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions projects/quml-demo-app/src/app/quml-library-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -502,9 +502,9 @@ export const samplePlayerConfig = {
'uid': '',
'channel': '01268904781886259221',
'pdata': {
'id': 'preprod.diksha.portal',
'id': 'dev.sunbird.portal',
'ver': '3.3.0',
'pid': 'sunbird-portal.contentplayer'
'pid': 'sunbird-portal.qumlplayer'
},
'contextRollup': {
'l1': 'string',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -533,9 +533,9 @@ export const playerConfig = {
'uid': '',
'channel': '01268904781886259221',
'pdata': {
'id': 'preprod.diksha.portal',
'id': 'dev.sunbird.portal',
'ver': '3.3.0',
'pid': 'sunbird-portal.contentplayer'
'pid': 'sunbird-portal.qumlplayer'
},
'contextRollup': {
'l1': 'string',
Expand Down Expand Up @@ -637,9 +637,9 @@ export const fakeSections = [
"uid": "",
"channel": "01268904781886259221",
"pdata": {
"id": "preprod.diksha.portal",
"id": "dev.sunbird.portal",
"ver": "3.3.0",
"pid": "sunbird-portal.contentplayer"
"pid": "sunbird-portal.qumlplayer"
},
"contextRollup": {
"l1": "string",
Expand Down Expand Up @@ -909,9 +909,9 @@ export const fakeSections = [
"uid": "",
"channel": "01268904781886259221",
"pdata": {
"id": "preprod.diksha.portal",
"id": "dev.sunbird.portal",
"ver": "3.3.0",
"pid": "sunbird-portal.contentplayer"
"pid": "sunbird-portal.qumlplayer"
},
"contextRollup": {
"l1": "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,9 @@ export const mockQumlLibraryServiceData = {
},
channel: "01268904781886259221",
pdata: {
"id": "preprod.diksha.portal",
"id": "dev.sunbird.portal",
"ver": "3.3.0",
"pid": "sunbird-portal.contentplayer"
"pid": "sunbird-portal.qumlplayer"
},
sid: "913b3c6c-2874-26dd-ed0c-c23ddc00b718",
uid: "",
Expand All @@ -289,9 +289,9 @@ export const telemetryContext = {
"uid": "",
"channel": "01268904781886259221",
"pdata": {
"id": "preprod.diksha.portal",
"id": "dev.sunbird.portal",
"ver": "3.3.0",
"pid": "sunbird-portal.contentplayer"
"pid": "sunbird-portal.qumlplayer"
},
"contextRollup": {
"l1": "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,9 +315,9 @@ export const mockSectionPlayerConfig = {
"uid": "",
"channel": "01268904781886259221",
"pdata": {
"id": "preprod.diksha.portal",
"id": "dev.sunbird.portal",
"ver": "3.3.0",
"pid": "sunbird-portal.contentplayer"
"pid": "sunbird-portal.qumlplayer"
},
"contextRollup": {
"l1": "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ export const mockData = {
"uid": "",
"channel": "01268904781886259221",
"pdata": {
"id": "preprod.diksha.portal",
"id": "dev.sunbird.portal",
"ver": "3.3.0",
"pid": "sunbird-portal.contentplayer"
"pid": "sunbird-portal.qumlplayer"
},
"contextRollup": {
"l1": "string",
Expand Down
4 changes: 2 additions & 2 deletions web-component-examples/react-app/src/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -473,9 +473,9 @@ export const playerConfig = {
uid: "",
channel: "01268904781886259221",
pdata: {
id: "preprod.diksha.portal",
id: "dev.sunbird.portal",
ver: "3.3.0",
pid: "sunbird-portal.contentplayer",
pid: "sunbird-portal.qumlplayer",
},
contextRollup: {
l1: "string",
Expand Down
2 changes: 1 addition & 1 deletion web-component-examples/vanilla-js/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<script type="text/javascript" src="sunbird-quml-player.js"></script>
<script type="text/javascript">
const sectionContent = {"showStartPage":true, "copyright": "NIT123", "lastStatusChangedOn": "2022-12-12T11:21:38.818+0000", "author": "N11", "children": [ { "lastStatusChangedOn": "2022-12-12T11:21:38.792+0000", "parent": "do_21368754222912307211", "children": [ { "copyright": "NIT123", "lastStatusChangedOn": "2022-12-12T11:22:08.424+0000", "parent": "do_21368754291126272012", "author": "N11", "name": "Capital of Country", "createdOn": "2022-12-12T11:06:10.502+0000", "channel": "01309282781705830427", "maxScore": 1, "lastUpdatedOn": "2022-12-12T11:22:08.424+0000", "subject": [ "Hindi" ], "showTimer": false, "identifier": "do_21368754725275238414", "gradeLevel": [ "Class 4" ], "compatibilityLevel": 4, "audience": [ "Student" ], "se_boards": [ "CBSE" ], "primaryCategory": "Multiple Choice Question", "se_mediums": [ "English" ], "downloadUrl": "https://sunbirddevbbpublic.blob.core.windows.net/sunbird-content-staging/question/do_21368754725275238414/capital-of-country_1670844127836_do_21368754725275238414_1.ecar", "se_subjects": [ "Hindi" ], "medium": [ "English" ], "interactionTypes": [ "choice" ], "framework": "inquiry_k-12", "versionKey": "1670843170532", "mimeType": "application/vnd.sunbird.question", "code": "311dcf33-1374-71d5-bc17-163b0f780a15", "license": "CC BY 4.0", "prevStatus": "Draft", "templateId": "mcq-vertical", "language": [ "English" ], "board": "CBSE", "showFeedback": false, "objectType": "Question", "status": "Live", "createdBy": "5a587cc1-e018-4859-a0a8-e842650b9d64", "contentEncoding": "gzip", "depth": 2, "lastPublishedBy": "ae94b68c-a535-4dce-8e7a-fb9662b0ad68", "se_gradeLevels": [ "Class 4" ], "se_FWIds": [ "inquiry_k-12" ], "allowAnonymousAccess": "Yes", "contentDisposition": "inline", "artifactUrl": "https://sunbirddevbbpublic.blob.core.windows.net/sunbird-content-staging/question/do_21368754725275238414/do_21368754725275238414_1670844126738.zip", "visibility": "Parent", "qType": "MCQ", "showSolutions": false, "variants": { "full": { "ecarUrl": "https://sunbirddevbbpublic.blob.core.windows.net/sunbird-content-staging/question/do_21368754725275238414/capital-of-country_1670844127836_do_21368754725275238414_1.ecar", "size": "597400" }, "online": { "ecarUrl": "https://sunbirddevbbpublic.blob.core.windows.net/sunbird-content-staging/question/do_21368754725275238414/capital-of-country_1670844128179_do_21368754725275238414_1_ONLINE.ecar", "size": "1789" } }, "index": 1, "pkgVersion": 1 }, { "copyright": "NIT123", "lastStatusChangedOn": "2022-12-12T11:22:08.692+0000", "parent": "do_21368754291126272012", "author": "N11", "name": "MCQ-text1", "createdOn": "2022-12-12T11:15:55.372+0000", "channel": "01309282781705830427", "maxScore": 1, "lastUpdatedOn": "2022-12-12T11:22:08.692+0000", "subject": [ "Hindi" ], "showTimer": false, "identifier": "do_21368755204399923216", "gradeLevel": [ "Class 4" ], "compatibilityLevel": 4, "audience": [ "Student" ], "se_boards": [ "CBSE" ], "primaryCategory": "Multiple Choice Question", "se_mediums": [ "English" ], "downloadUrl": "https://sunbirddevbbpublic.blob.core.windows.net/sunbird-content-staging/question/do_21368755204399923216/mcq-text1_1670844128569_do_21368755204399923216_1.ecar", "se_subjects": [ "Hindi" ], "medium": [ "English" ], "interactionTypes": [ "choice" ], "framework": "inquiry_k-12", "versionKey": "1670843755400", "mimeType": "application/vnd.sunbird.question", "code": "d48899c0-f93f-09b7-720d-9649d6967da2", "license": "CC BY 4.0", "prevStatus": "Draft", "templateId": "mcq-vertical", "language": [ "English" ], "board": "CBSE", "showFeedback": false, "objectType": "Question", "status": "Live", "createdBy": "5a587cc1-e018-4859-a0a8-e842650b9d64", "contentEncoding": "gzip", "depth": 2, "lastPublishedBy": "ae94b68c-a535-4dce-8e7a-fb9662b0ad68", "se_gradeLevels": [ "Class 4" ], "se_FWIds": [ "inquiry_k-12" ], "allowAnonymousAccess": "Yes", "contentDisposition": "inline", "artifactUrl": "https://sunbirddevbbpublic.blob.core.windows.net/sunbird-content-staging/question/do_21368755204399923216/do_21368755204399923216_1670844128534.zip", "visibility": "Parent", "qType": "MCQ", "showSolutions": false, "variants": { "full": { "ecarUrl": "https://sunbirddevbbpublic.blob.core.windows.net/sunbird-content-staging/question/do_21368755204399923216/mcq-text1_1670844128569_do_21368755204399923216_1.ecar", "size": "21482" }, "online": { "ecarUrl": "https://sunbirddevbbpublic.blob.core.windows.net/sunbird-content-staging/question/do_21368755204399923216/mcq-text1_1670844128639_do_21368755204399923216_1_ONLINE.ecar", "size": "2414" } }, "index": 2, "pkgVersion": 1 } ], "name": "Section-1", "navigationMode": "non-linear", "createdOn": "2022-12-12T10:57:20.535+0000", "channel": "01309282781705830427", "generateDIALCodes": "No", "lastUpdatedOn": "2022-12-12T11:21:38.792+0000", "showTimer": false, "identifier": "do_21368754291126272012", "description": "Section", "containsUserData": "No", "allowSkip": "Yes", "compatibilityLevel": 5, "trackable": { "enabled": "No", "autoBatch": "No" }, "primaryCategory": "Practice Question Set", "setType": "materialised", "languageCode": [ "en" ], "attributions": [], "scoreCutoffType": "AssessmentLevel", "versionKey": "1670842640535", "mimeType": "application/vnd.sunbird.questionset", "code": "358766e3-35e2-13e7-e9d2-6bb0f82771a5", "license": "CC BY 4.0", "prevStatus": "Draft", "showHints": false, "language": [ "English" ], "showFeedback": false, "objectType": "QuestionSet", "status": "Live", "requiresSubmit": "No", "shuffle": true, "contentEncoding": "gzip", "depth": 1, "allowAnonymousAccess": "Yes", "contentDisposition": "inline", "allowBranching": "No", "visibility": "Parent", "showSolutions": false, "index": 1 }, { "lastStatusChangedOn": "2022-12-12T11:21:38.793+0000", "parent": "do_21368754222912307211", "children": [ { "copyright": "NIT123", "lastStatusChangedOn": "2022-12-12T11:22:08.940+0000", "parent": "do_21368755318300672013", "author": "N11", "name": "MCQ1", "createdOn": "2022-12-12T11:19:53.268+0000", "channel": "01309282781705830427", "maxScore": 1, "lastUpdatedOn": "2022-12-12T11:22:08.940+0000", "subject": [ "Hindi" ], "showTimer": false, "identifier": "do_21368755399285145618", "gradeLevel": [ "Class 4" ], "compatibilityLevel": 4, "audience": [ "Student" ], "se_boards": [ "CBSE" ], "primaryCategory": "Multiple Choice Question", "se_mediums": [ "English" ], "downloadUrl": "https://sunbirddevbbpublic.blob.core.windows.net/sunbird-content-staging/question/do_21368755399285145618/mcq1_1670844128817_do_21368755399285145618_1.ecar", "se_subjects": [ "Hindi" ], "medium": [ "English" ], "interactionTypes": [ "choice" ], "framework": "inquiry_k-12", "versionKey": "1670843993296", "mimeType": "application/vnd.sunbird.question", "code": "a9c65881-65c6-847d-8d08-407f2bbbd9b9", "license": "CC BY 4.0", "prevStatus": "Draft", "templateId": "mcq-vertical", "language": [ "English" ], "board": "CBSE", "showFeedback": false, "objectType": "Question", "status": "Live", "createdBy": "5a587cc1-e018-4859-a0a8-e842650b9d64", "contentEncoding": "gzip", "depth": 2, "lastPublishedBy": "ae94b68c-a535-4dce-8e7a-fb9662b0ad68", "se_gradeLevels": [ "Class 4" ], "se_FWIds": [ "inquiry_k-12" ], "allowAnonymousAccess": "Yes", "contentDisposition": "inline", "artifactUrl": "https://sunbirddevbbpublic.blob.core.windows.net/sunbird-content-staging/question/do_21368755399285145618/do_21368755399285145618_1670844128780.zip", "visibility": "Parent", "qType": "MCQ", "showSolutions": false, "variants": { "full": { "ecarUrl": "https://sunbirddevbbpublic.blob.core.windows.net/sunbird-content-staging/question/do_21368755399285145618/mcq1_1670844128817_do_21368755399285145618_1.ecar", "size": "17177" }, "online": { "ecarUrl": "https://sunbirddevbbpublic.blob.core.windows.net/sunbird-content-staging/question/do_21368755399285145618/mcq1_1670844128886_do_21368755399285145618_1_ONLINE.ecar", "size": "2522" } }, "index": 1, "pkgVersion": 1 } ], "name": "Section-2", "navigationMode": "non-linear", "createdOn": "2022-12-12T11:18:14.410+0000", "channel": "01309282781705830427", "generateDIALCodes": "No", "lastUpdatedOn": "2022-12-12T11:21:38.793+0000", "showTimer": false, "identifier": "do_21368755318300672013", "containsUserData": "No", "allowSkip": "Yes", "compatibilityLevel": 5, "trackable": { "enabled": "No", "autoBatch": "No" }, "primaryCategory": "Practice Question Set", "setType": "materialised", "languageCode": [ "en" ], "attributions": [], "scoreCutoffType": "AssessmentLevel", "versionKey": "1670843894410", "mimeType": "application/vnd.sunbird.questionset", "code": "685a65af-d1ce-4611-059c-0ec5ad5ef477", "license": "CC BY 4.0", "prevStatus": "Draft", "showHints": false, "language": [ "English" ], "showFeedback": false, "objectType": "QuestionSet", "status": "Live", "requiresSubmit": "No", "shuffle": true, "contentEncoding": "gzip", "depth": 1, "allowAnonymousAccess": "Yes", "contentDisposition": "inline", "allowBranching": "No", "visibility": "Parent", "showSolutions": false, "index": 2 } ], "name": "MCQ Question Set 1", "navigationMode": "non-linear", "createdOn": "2022-12-12T10:55:57.311+0000", "createdFor": [ "01309282781705830427" ], "channel": "01309282781705830427", "pdfUrl": "https://sunbirddevbbpublic.blob.core.windows.net/sunbird-content-staging/questionset/do_21368754222912307211/do_21368754222912307211_pdf_1670844129483.pdf", "generateDIALCodes": "No", "lastUpdatedOn": "2022-12-12T11:21:38.843+0000", "subject": [ "Hindi" ], "size": 337995, "showTimer": false, "identifier": "do_21368754222912307211", "description": "MCQ Question Set 1", "gradeLevel": [ "Class 4" ], "containsUserData": "No", "allowSkip": "Yes", "compatibilityLevel": 5, "audience": [ "Student" ], "trackable": "{\"enabled\":\"No\",\"autoBatch\":\"No\"}", "se_boards": [ "CBSE" ], "primaryCategory": "Practice Question Set", "setType": "materialised", "appIcon": "https://sunbirddevbbpublic.blob.core.windows.net/sunbird-content-staging/content/assets/do_2136875423378145281221/apple.jpeg", "se_mediums": [ "English" ], "downloadUrl": "https://sunbirddevbbpublic.blob.core.windows.net/sunbird-content-staging/questionset/do_21368754222912307211/mcq-question-set-1_1670844129320_do_21368754222912307211_1.ecar", "se_subjects": [ "Hindi" ], "medium": [ "English" ], "attributions": [], "scoreCutoffType": "AssessmentLevel", "framework": "inquiry_k-12", "versionKey": "1670844098843", "mimeType": "application/vnd.sunbird.questionset", "code": "7d5aaa70-ffb8-d062-ba10-1db445a11dbc", "license": "CC BY 4.0", "prevStatus": "Draft", "showHints": false, "language": [ "English" ], "board": "CBSE", "showFeedback": false, "lastPublishedOn": "2022-12-12T11:22:09.041+0000", "objectType": "QuestionSet", "status": "Live", "createdBy": "5a587cc1-e018-4859-a0a8-e842650b9d64", "requiresSubmit": "No", "shuffle": true, "contentEncoding": "gzip", "depth": 0, "consumerId": "6968004d-c67e-434a-a350-773aa1e068a3", "lastPublishedBy": "ae94b68c-a535-4dce-8e7a-fb9662b0ad68", "se_gradeLevels": [ "Class 4" ], "se_FWIds": [ "inquiry_k-12" ], "allowAnonymousAccess": "Yes", "contentDisposition": "inline", "additionalCategories": [], "allowBranching": "No", "previewUrl": "https://sunbirddevbbpublic.blob.core.windows.net/sunbird-content-staging/questionset/do_21368754222912307211/do_21368754222912307211_html_1670844129483.html", "childNodes": [ "do_21368754725275238414", "do_21368754291126272012", "do_21368755204399923216", "do_21368755399285145618", "do_21368755318300672013" ], "visibility": "Default", "showSolutions": false, "variants": { "spine": { "ecarUrl": "https://sunbirddevbbpublic.blob.core.windows.net/sunbird-content-staging/questionset/do_21368754222912307211/mcq-question-set-1_1670844129213_do_21368754222912307211_1_SPINE.ecar", "size": "19859" }, "online": { "ecarUrl": "https://sunbirddevbbpublic.blob.core.windows.net/sunbird-content-staging/questionset/do_21368754222912307211/mcq-question-set-1_1670844129277_do_21368754222912307211_1_ONLINE.ecar", "size": "4348" }, "full": { "ecarUrl": "https://sunbirddevbbpublic.blob.core.windows.net/sunbird-content-staging/questionset/do_21368754222912307211/mcq-question-set-1_1670844129320_do_21368754222912307211_1.ecar", "size": "337995" } }, "pkgVersion": 1, "instructions": "<p>This is a sample instructions</p>", "outcomeDeclaration": { "maxScore": { "cardinality": "single", "type": "integer", "defaultValue": 3 } } };
const playerConfig = {"context":{"threshold":3,"mode":"play","authToken":" ","sid":"913b3c6c-2874-26dd-ed0c-c23ddc00b718","did":"561c348e631fd225b46a5571cbd42ad1","uid":"","channel":"01268904781886259221","pdata":{"id":"preprod.diksha.portal","ver":"3.3.0","pid":"sunbird-portal.contentplayer"},"contextRollup":{"l1":"string","l2":"string","l3":"string","l4":"string"},"tags":[],"cdata":[{"id":"c0c9384a82a75f219468d363e1891963","type":"ContentSession"},{"id":"a12f45a1d7078901adb27b48be4b428d","type":"PlaySession"}],"timeDiff":5,"objectRollup":{"l1":"string","l2":"string","l3":"string","l4":"string"},"host":"","endpoint":"/data/v3/telemetry","userData":{"firstName":"Test","lastName":"User"}},"metadata":sectionContent,"config":{"traceId":"1234","sideMenu":{"showShare":true,"showDownload":true,"showReplay":true,"showExit":true}}};
const playerConfig = {"context":{"threshold":3,"mode":"play","authToken":" ","sid":"913b3c6c-2874-26dd-ed0c-c23ddc00b718","did":"561c348e631fd225b46a5571cbd42ad1","uid":"","channel":"01268904781886259221","pdata":{"id":"dev.sunbird.portal","ver":"3.3.0","pid":"sunbird-portal.qumlplayer"},"contextRollup":{"l1":"string","l2":"string","l3":"string","l4":"string"},"tags":[],"cdata":[{"id":"c0c9384a82a75f219468d363e1891963","type":"ContentSession"},{"id":"a12f45a1d7078901adb27b48be4b428d","type":"PlaySession"}],"timeDiff":5,"objectRollup":{"l1":"string","l2":"string","l3":"string","l4":"string"},"host":"","endpoint":"/data/v3/telemetry","userData":{"firstName":"Test","lastName":"User"}},"metadata":sectionContent,"config":{"traceId":"1234","sideMenu":{"showShare":true,"showDownload":true,"showReplay":true,"showExit":true}}};

// Need to pass the API URL to fetch the question set
window.questionListUrl = 'https://dev.inquiry.sunbird.org/api/question/v2/list';
Expand Down

0 comments on commit 882b0da

Please sign in to comment.