From 8f4f0bcb9b52df9a39fceca191f0b2157a1aaa69 Mon Sep 17 00:00:00 2001 From: Rajnish Dargan Date: Tue, 19 Sep 2023 17:43:32 +0530 Subject: [PATCH 1/2] Issue #IQ-569 feat: Removal of hardcoding specific to Student, Teacher, Parent --- docs/Practice Question Set.json | 6 +-- .../assign-page-number.component.spec.data.ts | 14 +++---- .../editor/editor.component.spec.data.ts | 37 +++++++++---------- .../fancy-tree.component.spec.data.ts | 8 ++-- .../meta-form.component.spec.data.ts | 16 ++++---- .../meta-form/meta-form.component.spec.ts | 4 +- .../question/question.component.spec.data.ts | 8 ++-- .../quml-player.component.spec.data.ts | 14 +++---- .../qumlplayer-page.component.spec.data.ts | 16 ++++---- .../editor/editor.service.spec.data.ts | 8 ++-- .../services/tree/tree.service.spec.data.ts | 2 +- 11 files changed, 65 insertions(+), 68 deletions(-) diff --git a/docs/Practice Question Set.json b/docs/Practice Question Set.json index aa9f9260a..774194926 100644 --- a/docs/Practice Question Set.json +++ b/docs/Practice Question Set.json @@ -481,9 +481,9 @@ "required": true, "visible": true, "range": [ - "Student", - "Teacher", - "Administrator" + "Audience1", + "Audience2", + "Audience3" ], "renderingHints": { "class": "sb-g-col-lg-1 required" diff --git a/projects/questionset-editor-library/src/lib/components/assign-page-number/assign-page-number.component.spec.data.ts b/projects/questionset-editor-library/src/lib/components/assign-page-number/assign-page-number.component.spec.data.ts index 62b473603..28fc8cb64 100644 --- a/projects/questionset-editor-library/src/lib/components/assign-page-number/assign-page-number.component.spec.data.ts +++ b/projects/questionset-editor-library/src/lib/components/assign-page-number/assign-page-number.component.spec.data.ts @@ -49,7 +49,7 @@ export const mockTreeData = [ "visibility": "Parent", "showTimer": false, "groups": { - "Student interview": [ + "Audience1 interview": [ "do_113449672558780416163" ] }, @@ -234,18 +234,18 @@ export const mockTreeData = [ "visibility": "Parent", "showTimer": false, "groups": { - "Student interview": [ + "Audience1 interview": [ "do_113449672558780416163", "do_11364358223115059211484" ], - "Teacher interview": [ + "Audience2 interview": [ "do_11358056771369369615004", "do_1136011660822200321804" ], - "Official interview": [ + "Audience3 interview": [ "do_1136011666813255681808" ], - "Parent interview": [ + "Audience4 interview": [ "do_11364297206960128011480" ] }, @@ -1068,7 +1068,7 @@ export const mockTreeData = [ "visibility": "Parent", "showTimer": false, "groups": { - "Teacher interview": [ + "Audience2 interview": [ "do_11357919243396710414900" ] }, @@ -1321,7 +1321,7 @@ export const mockTreeData = [ "visibility": "Parent", "showTimer": false, "groups": { - "Parent interview": [ + "Audience4 interview": [ "do_113583348668153856123" ] }, diff --git a/projects/questionset-editor-library/src/lib/components/editor/editor.component.spec.data.ts b/projects/questionset-editor-library/src/lib/components/editor/editor.component.spec.data.ts index 8f3887307..574e96907 100644 --- a/projects/questionset-editor-library/src/lib/components/editor/editor.component.spec.data.ts +++ b/projects/questionset-editor-library/src/lib/components/editor/editor.component.spec.data.ts @@ -509,13 +509,13 @@ export const categoryDefinition = { required: false, visible: true, range: [ - 'Education Official', - 'School leaders (HMs)', - 'Teachers', - 'Students', - 'Parents', - 'Parent', - 'Others', + 'Audience1', + 'Audience2', + 'Audience3', + 'Audience4', + 'Audience5', + 'Audience6', + 'Audience7', ], }, { @@ -590,14 +590,11 @@ export const categoryDefinition = { class: 'sb-g-col-lg-1', }, options: [ - 'Student interview', - 'Teacher interview', - 'HM/HT interview', - 'Parent interview', - 'Official interview', - 'School walkthrough', - 'Class observation', - 'Document Review', + 'Audience1 interview', + 'Audience2 interview', + 'Audience3 interview', + 'Audience4 interview', + 'Audience5 interview' ], }, ], @@ -673,7 +670,7 @@ export const hierarchyResponse = [ }, "identifier": "do_2138622515299368961170", "audience": [ - "Student" + "Audience1" ], "visibility": "Default", "showTimer": true, @@ -1082,9 +1079,9 @@ export const categoryDefinitionData = { "required": true, "visible": true, "range": [ - "Student", - "Teacher", - "Administrator" + "Audience1", + "Audience2", + "Audience3" ], "renderingHints": { "class": "sb-g-col-lg-1 required" @@ -3520,7 +3517,7 @@ export const nodesModifiedData = { 'Mathematics' ], audience: [ - 'Student' + 'Audience1' ], shuffle: true, showFeedback: false, diff --git a/projects/questionset-editor-library/src/lib/components/fancy-tree/fancy-tree.component.spec.data.ts b/projects/questionset-editor-library/src/lib/components/fancy-tree/fancy-tree.component.spec.data.ts index 39e9042ef..444b91808 100644 --- a/projects/questionset-editor-library/src/lib/components/fancy-tree/fancy-tree.component.spec.data.ts +++ b/projects/questionset-editor-library/src/lib/components/fancy-tree/fancy-tree.component.spec.data.ts @@ -207,7 +207,7 @@ export const treeData = { autoBatch: "No", }, identifier: "do_113289107070615552146", - audience: ["Student"], + audience: ["Audience1"], visibility: "Default", discussionForum: { enabled: "Yes", @@ -280,7 +280,7 @@ export const treeData = { }, identifier: "do_113277071092588544112", lastStatusChangedOn: "2021-05-11T12:30:17.357+0000", - audience: ["Student"], + audience: ["Audience1"], os: ["All"], visibility: "Parent", discussionForum: { @@ -356,7 +356,7 @@ export const tree = [ autoBatch: "No", }, identifier: "do_113276371461185536128", - audience: ["Student"], + audience: ["Audience1"], visibility: "Default", consumerId: "dab07952-5d6c-459e-86ce-0bc31d90277f", discussionForum: { @@ -469,7 +469,7 @@ export const tree = [ autoBatch: "No", }, identifier: "do_113276369323016192113", - audience: ["Student"], + audience: ["Audience1"], visibility: "Default", author: "may7thindividual@yopmail.com", consumerId: "33fb55ad-344e-4849-ab9b-e8e5e59e39ad", diff --git a/projects/questionset-editor-library/src/lib/components/meta-form/meta-form.component.spec.data.ts b/projects/questionset-editor-library/src/lib/components/meta-form/meta-form.component.spec.data.ts index 4e11002c3..23c54bbbb 100644 --- a/projects/questionset-editor-library/src/lib/components/meta-form/meta-form.component.spec.data.ts +++ b/projects/questionset-editor-library/src/lib/components/meta-form/meta-form.component.spec.data.ts @@ -143,13 +143,13 @@ export const mockData = { required: false, visible: true, range: [ - 'Education Official', - 'School leaders (HMs)', - 'Teachers', - 'Students', - 'Parents', - 'Parent', - 'Others' + 'Audience1', + 'Audience2', + 'Audience3', + 'Audience4', + 'Audience5', + 'Audience6', + 'Audience7' ] }, { @@ -363,7 +363,7 @@ export const mockData = { showSolutions: false, identifier: 'do_113263678834016256111', audience: [ - 'Student' + 'Audience1' ], visibility: 'Default', showTimer: true, diff --git a/projects/questionset-editor-library/src/lib/components/meta-form/meta-form.component.spec.ts b/projects/questionset-editor-library/src/lib/components/meta-form/meta-form.component.spec.ts index a251c31e4..e41124624 100644 --- a/projects/questionset-editor-library/src/lib/components/meta-form/meta-form.component.spec.ts +++ b/projects/questionset-editor-library/src/lib/components/meta-form/meta-form.component.spec.ts @@ -48,7 +48,7 @@ describe('MetaFormComponent', () => { component.appIcon = 'https://sunbirddev.blob.core.windows.net/sunbird-content-dev/content/do_11320764935163904015/artifact/2020101299.png'; component.showAppIcon = true; const event = { - instance: 'Add Student', + instance: 'Add Audience1', appIcon: 'https://sunbirddev.blob.core.windows.net/sunbird-content-dev/content/do_11320764935163904015/artifact/2020101299.png', allowECM : 'No', levels : ['good', 'bad', 'average'], @@ -217,7 +217,7 @@ describe('MetaFormComponent', () => { component.appIcon = 'https://sunbirddev.blob.core.windows.net/sunbird-content-dev/content/do_11320764935163904015/artifact/2020101299.png'; component.showAppIcon = true; const event = { - instance: 'Add Student', + instance: 'Add Audience1', appIcon: 'https://sunbirddev.blob.core.windows.net/sunbird-content-dev/content/do_11320764935163904015/artifact/2020101299.png', shuffle: true }; diff --git a/projects/questionset-editor-library/src/lib/components/question/question.component.spec.data.ts b/projects/questionset-editor-library/src/lib/components/question/question.component.spec.data.ts index cb904dbc4..5a980b036 100644 --- a/projects/questionset-editor-library/src/lib/components/question/question.component.spec.data.ts +++ b/projects/questionset-editor-library/src/lib/components/question/question.component.spec.data.ts @@ -1018,10 +1018,10 @@ export const collectionHierarchyMock = { mimeType: "application/vnd.sunbird.questionset", showHints: false, ecm: [ - "Student interview", - "Teacher interview", - "Parent interview", - "HM/HT interview", + "Audience1 interview", + "Audience2 interview", + "Audience3 interview", + "Audience4 interview", ], objectType: "QuestionSet", gradeLevel: ["Grade 1"], diff --git a/projects/questionset-editor-library/src/lib/components/quml-player/quml-player.component.spec.data.ts b/projects/questionset-editor-library/src/lib/components/quml-player/quml-player.component.spec.data.ts index 90eb1d405..2732eac4f 100644 --- a/projects/questionset-editor-library/src/lib/components/quml-player/quml-player.component.spec.data.ts +++ b/projects/questionset-editor-library/src/lib/components/quml-player/quml-player.component.spec.data.ts @@ -198,7 +198,7 @@ export const mockData = { "identifier": "do_11326368076523929611", "lastStatusChangedOn": "2021-04-22T14:27:35.932+0000", "audience": [ - "Student" + "Audience1" ], "visibility": "Parent", "showTimer": false, @@ -256,7 +256,7 @@ export const mockData = { "identifier": "do_113264100861919232115", "lastStatusChangedOn": "2021-04-23T04:42:17.246+0000", "audience": [ - "Student" + "Audience1" ], "visibility": "Parent", "showTimer": false, @@ -314,7 +314,7 @@ export const mockData = { "identifier": "do_113264103767826432118", "lastStatusChangedOn": "2021-04-23T04:48:11.971+0000", "audience": [ - "Student" + "Audience1" ], "visibility": "Parent", "showTimer": false, @@ -373,7 +373,7 @@ export const mockData = { "identifier": "do_113264105505570816124", "lastStatusChangedOn": "2021-04-23T04:51:44.098+0000", "audience": [ - "Student" + "Audience1" ], "visibility": "Parent", "showTimer": false, @@ -434,7 +434,7 @@ export const mockData = { "identifier": "do_113264162822283264127", "lastStatusChangedOn": "2021-04-23T06:48:20.767+0000", "audience": [ - "Student" + "Audience1" ], "visibility": "Parent", "showTimer": false, @@ -492,7 +492,7 @@ export const mockData = { "identifier": "do_113264164671733760129", "lastStatusChangedOn": "2021-04-23T06:52:06.530+0000", "audience": [ - "Student" + "Audience1" ], "visibility": "Parent", "showTimer": false, @@ -526,7 +526,7 @@ export const mockData = { "showSolutions": false, "identifier": "do_113263678834016256111", "audience": [ - "Student" + "Audience1" ], "visibility": "Default", "showTimer": true, diff --git a/projects/questionset-editor-library/src/lib/components/qumlplayer-page/qumlplayer-page.component.spec.data.ts b/projects/questionset-editor-library/src/lib/components/qumlplayer-page/qumlplayer-page.component.spec.data.ts index 5d9a6095c..d982c2b3f 100644 --- a/projects/questionset-editor-library/src/lib/components/qumlplayer-page/qumlplayer-page.component.spec.data.ts +++ b/projects/questionset-editor-library/src/lib/components/qumlplayer-page/qumlplayer-page.component.spec.data.ts @@ -28,7 +28,7 @@ export const mockData = { "identifier": "do_11326368076523929611", "lastStatusChangedOn": "2021-04-22T14:27:35.932+0000", "audience": [ - "Student" + "Audience1" ], "visibility": "Parent", "showTimer": false, @@ -106,7 +106,7 @@ export const mockData = { "identifier": "do_11326368076523929611", "lastStatusChangedOn": "2021-04-22T14:27:35.932+0000", "audience": [ - "Student" + "Audience1" ], "visibility": "Parent", "showTimer": false, @@ -164,7 +164,7 @@ export const mockData = { "identifier": "do_113264100861919232115", "lastStatusChangedOn": "2021-04-23T04:42:17.246+0000", "audience": [ - "Student" + "Audience1" ], "visibility": "Parent", "showTimer": false, @@ -222,7 +222,7 @@ export const mockData = { "identifier": "do_113264103767826432118", "lastStatusChangedOn": "2021-04-23T04:48:11.971+0000", "audience": [ - "Student" + "Audience1" ], "visibility": "Parent", "showTimer": false, @@ -281,7 +281,7 @@ export const mockData = { "identifier": "do_113264105505570816124", "lastStatusChangedOn": "2021-04-23T04:51:44.098+0000", "audience": [ - "Student" + "Audience1" ], "visibility": "Parent", "showTimer": false, @@ -342,7 +342,7 @@ export const mockData = { "identifier": "do_113264162822283264127", "lastStatusChangedOn": "2021-04-23T06:48:20.767+0000", "audience": [ - "Student" + "Audience1nce1nce1" ], "visibility": "Parent", "showTimer": false, @@ -400,7 +400,7 @@ export const mockData = { "identifier": "do_113264164671733760129", "lastStatusChangedOn": "2021-04-23T06:52:06.530+0000", "audience": [ - "Student" + "Audience1" ], "visibility": "Parent", "showTimer": false, @@ -434,7 +434,7 @@ export const mockData = { "showSolutions": false, "identifier": "do_113263678834016256111", "audience": [ - "Student" + "Audience1" ], "visibility": "Default", "showTimer": true, diff --git a/projects/questionset-editor-library/src/lib/services/editor/editor.service.spec.data.ts b/projects/questionset-editor-library/src/lib/services/editor/editor.service.spec.data.ts index 52486747f..2e2e5be1c 100644 --- a/projects/questionset-editor-library/src/lib/services/editor/editor.service.spec.data.ts +++ b/projects/questionset-editor-library/src/lib/services/editor/editor.service.spec.data.ts @@ -36,7 +36,7 @@ export const rootNode = { identifier: 'do_1135097615298723841131', lastStatusChangedOn: '2022-04-05T06:40:11.752+0000', audience: [ - 'Student' + 'Audience1' ], visibility: 'Parent', showTimer: false, @@ -99,7 +99,7 @@ export const rootNode = { identifier: 'do_1135097709808189441133', lastStatusChangedOn: '2022-04-05T06:59:25.432+0000', audience: [ - 'Student' + 'Audience1' ], visibility: 'Parent', showTimer: false, @@ -231,7 +231,7 @@ export const questionsData = [ identifier: 'do_1135097709808189441133', lastStatusChangedOn: '2022-04-05T06:59:25.432+0000', audience: [ - 'Student' + 'Audience1' ], visibility: 'Parent', showTimer: false, @@ -347,7 +347,7 @@ export const questionsData = [ identifier: 'do_1135097615298723841131', lastStatusChangedOn: '2022-04-05T06:40:11.752+0000', audience: [ - 'Student' + 'Audience1' ], visibility: 'Parent', showTimer: false, diff --git a/projects/questionset-editor-library/src/lib/services/tree/tree.service.spec.data.ts b/projects/questionset-editor-library/src/lib/services/tree/tree.service.spec.data.ts index b4502805d..123f7cb15 100644 --- a/projects/questionset-editor-library/src/lib/services/tree/tree.service.spec.data.ts +++ b/projects/questionset-editor-library/src/lib/services/tree/tree.service.spec.data.ts @@ -24,7 +24,7 @@ export const treeNode = { "showSolutions": false, "identifier": "do_113263678834016256111", "audience": [ - "Student" + "Audience1" ], "visibility": "Default", "showTimer": true, From ea91df5d5a0557a857ecc1d7fcfda81e2882a802 Mon Sep 17 00:00:00 2001 From: Rajnish Dargan Date: Thu, 21 Sep 2023 16:43:19 +0530 Subject: [PATCH 2/2] Issue #IQ-569 feat: Removal of hard-coding specific to Student, Teacher, Parent --- .../qumlplayer-page/qumlplayer-page.component.spec.data.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/questionset-editor-library/src/lib/components/qumlplayer-page/qumlplayer-page.component.spec.data.ts b/projects/questionset-editor-library/src/lib/components/qumlplayer-page/qumlplayer-page.component.spec.data.ts index d982c2b3f..a660f487b 100644 --- a/projects/questionset-editor-library/src/lib/components/qumlplayer-page/qumlplayer-page.component.spec.data.ts +++ b/projects/questionset-editor-library/src/lib/components/qumlplayer-page/qumlplayer-page.component.spec.data.ts @@ -342,7 +342,7 @@ export const mockData = { "identifier": "do_113264162822283264127", "lastStatusChangedOn": "2021-04-23T06:48:20.767+0000", "audience": [ - "Audience1nce1nce1" + "Audience1" ], "visibility": "Parent", "showTimer": false,