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 |
---|
export interface Context { programId?: string; contributionOrgId?: string; user: User; identifier?: string; mode?: string; authToken?: string; sid: string; did: string; uid: string; channel: string; pdata: Pdata; contextRollup: ContextRollup; tags: string[]; cdata?: Cdata[]; timeDiff?: number; objectRollup?: ObjectRollup; host?: string; endpoint?: string; userData?: { firstName: string; lastName: string; }; env: string; defaultLicense?: any; board?: any; medium?: any; gradeLevel?: any; subject?: any; topic?: any; framework: string; cloudStorageUrls?: string[]; additionalCategories?: any[]; labels?: any; actortargetFWIds?: any; channelData?: any; correctionComments?: any; sourcingResourceStatus?: string; sourcingResourceStatusClass?: string; collectionIdentifier?: string; unitIdentifier?: string; collectionObjectType?: string; collectionPrimaryCategory?: string; targetFWIds?: string[]; } |
...
string[];
} |
Description of the properties for the context
Property | Required | Description |
---|---|---|
programId | false | program id in which questionset is created. |
contributionOrgId | false | Organisation id of the contributor. |
user | true | User object which contains users id, fullName, lastName, orgIds. |
identifier | false | identifier of questionset |
authToken | false | Authentication token |
sid | true | session id of the requestor stamped by portal |
did | true | uuid of the device |
channel | true | Channel which has produced the event |
pdata | true | Producer of the event |
contextRollup | true | Context Rollups upto level 4 |
tags | true | Encrypted dimension tags passed by respective channels |
cdata | false | Correlation data |
timeDiff | false | Last player duration |
objectRollup | false | Object Rollup up to level 4 |
host | false | Host URL |
endpoint | false | Telemetry API endpoint |
userData.firstName | false | User's first name |
userData.lastName | false | User's last name |
env | true | type of editor , in case of questionset editor its |
defaultLicense | false | default license of questionset |
framework | true | Organisation framework id |
cloudStorageUrls | false | Array of cloud storage urls |
additionalCategories | false | Array of objects of additional categories |
labels | false | Additional labels to be used in editor |
targetFWIds | false | Array of target framework ids |
2. Config - Required
This Required property from the questionsetEditorConfig
provides the configuration for the questionset editor to enable/disable some functionalities.
...
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
...