Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Contains QuestionSet Editor library components powered by angular. These components are designed to be used in the sunbirdEd portal and coKreat reference web portal to drive reusability, maintainability hence reducing the redundant development effort significantly.

...

Code Block
Update the host variable to which env your pointing. example if you are pointing sunbird dev instance update variable like below
const BASE_URL = 'dev.sunbirded.org'
const API_AUTH_TOKEN = 'XXXX'
const PORTALUSER_COOKIESTOKEN= 'YYYY'

Note: You will need actual API_AUTH_TOKEN and PORTAL_COOKIES should be of same user with which you are creating the questionset in portal. PORTAL_COOKIES you can get from the network tab in any XHR API call header

...

USER_TOKEN

If you are pointing to sunbird dev (dev.sunbirded.org), create a Question Set in sunbird dev, copy the questionset_id from the browser url and set the do_id of Question Set in data.ts file

...

Code Block
Update the host variable to which env your pointing. example if you are pointing sunbird dev instance update variable like below
const BASE_URL = 'dev.sunbirded.org'
const API_AUTH_TOKEN = 'XXXX'
const PORTALUSER_COOKIESTOKEN= 'YYYY'

Note: You will need actual API_AUTH_TOKEN and PORTAL_COOKIES should be of same user with which you are creating the questionset in portal. PORTAL_COOKIES you can get from the network tab in any XHR API call header USER_TOKEN

If you are pointing to sunbird dev (dev.sunbirded.org), create a Question Set in sunbird dev and set the do_id of Question Set in data.ts file

...

Property

Default Value

Required

Description

mode

true

Defines the mode in editor is to be loaded loaded.

editableFields

{

sourcingreview: [], orgreview: [], review: [],

}

false

Defines which fields is to be enabled when mode of questionset is

review / sourcingReview / orgReview

enableQuestionCreation

true

false

It enables or disables the creation of question in questionset

assetConfig

false

asset Config sets the max size limit for image and videos to be uploaded in question in questionset.

maxDepth

true

Defines the depth to which the questionset is to be created. If the depth is 1, hierarchy should have level1 described.

children

true

If maxdepth is 0 this children inside the root node defines the template of questions.

hierarchy

false

If maxdepth is > 0 then hierarchy should have definiton of the levels.

objectType

'QuestionSet'

true

Defines the object type

primaryCategory

'Practice Question Set'

true

Defines the primary category

isRoot

true

true

Defines the node is root node.

iconClass

'fa fa-book'

true

Defines the icon of root node

showAddCollaborator

false

false

This is to enable/disable the functionality of add collaborator in questionset. If it is true add collobrorator button will be enabled and created can add the collolaborator to collaborate in questionset.

questionSet. maxQuestionsLimit

false

It defines the limit of total number of question to be created inside questionset.

contentPolicyUrl

true

It defines where should the content policy link will be redirected.

  • mode:

mode: edit (all the fields will be enable to edit for questionset creator)

...

mode: sourcingReview (all those fields will be enabled whatever will be present in editableFields.sourcingreview)

...

  • enableQuestionCreation:

When enableQuestionCreation: false “Create New” button gets disabled

...