Background
While comparing the existing inQuiry question and question set metadata and schema with QuML schema specs we found few difference which is mentioned in the below sheet:
Question & Questionset QuML compliant difference
Also currently we are not storing some of the metadata properties with language code.
Question set properties which should have language code are:-
instructions, feedback, hints
Question properties which should have language code are:-
body, answer, hints, solutions, interactions , instructions ,feedback
Problem Statements
How to make existing metadata properties QuML complaints :-
Language code support
Currently we are storing some of the metadata of question and question set in a string format.
Example: Inside the question metadata we are storing body as:
Code Block |
---|
{
body: ‘What is the capital of India?’
} |
For making it’s storage in multi-lingual format it should be stored as:
Code Block |
---|
{
body: {
"en": "What is the capital of India?"
}
} |
The properties of question set which should have a language code format are:
instructions (text)
feedback (currently not in use)
hints (currently not in use)
The properties of question which should have a language code format are:
body (text or text+ image)
answer (text or text + image)
hints (text)
solutions (text or text+ image/video)
interactions (text or text+ image)
instructions (currently not in use)
feedback (currently not in use)
Proposed Solution for language code support:
For adding instructions in question set with language code, we can add a language drop down field in the question set form.
The default value of the drop down should be ‘English’ this default value and range of options can be set from form configuration where we can give default value as ‘English’ and other languages can be added to it in the configuration:
Code Block | ||
---|---|---|
| ||
{
"code": "languageCode",
"name": "Language Code",
"label": "Select Language for instruction",
"placeholder": "Select Language",
"description": "It's the Language of instruction",
"dataType": "text",
"inputType": "select",
"output": "identifier",
"default": "en",
"range": [{
"identifier": "en",
"label": "English"
},
{
"identifier": "hi",
"label": "Hindi"
}
],
"editable": true,
"required": false,
"visible": true,
"renderingHints": {
"class": "sb-g-col-lg-1"
}
} |
Same config we can have in question creation page to have a language drop down field and based on selection we can form the required format out of the text filled by the user.
timeLimits
Time limits is currently being stored in the question set metadata in below format:
Code Block | ||
---|---|---|
| ||
timeLimits: {
"maxTime": "360",
"warningTime": "120"
} |
The use of maxTime is show the timer on questionset player and warningTime is used to show the timer in red color indicating your are left with only these few minutes to complete the questionset.
But as per the QuML schema it should be stored in the below format:
...
language | json |
---|
...
gaps. Below are the properties having some differences from the QuML specs:
Question metadata which have some differences from the QuML specs are:-
responseDeclaration
media
responseDeclaration
Response Declaration is currently stored in below format but two properties are not allowed in it, which are: maxScore
and outcomes
Code Block |
---|
"responseDeclaration": { "response1": { "maxScore": 1, // maxScore is not allowed here "cardinality": "single", "type": "integer", "correctResponse": { "value": "0", "outcomes": { "SCORE": 1 min: number, } // outcome is not allowed here, max:only numberproperty ‘value’ is allowed }, question: { }, min: number, "mapping": [] max: number } } } |
Proposed Solution for timeLimits
We can set the limit for the complete question set as:
...
language | json |
---|
...
responseDeclaration
Instead of keeping maxScore
and outcomes
in responseDeclaration
we can store it in outcomeVariables
as below:
Code Block |
---|
"outcomeVariables": {
"maxScore": 1,
} |
we will not store outcomes.score because maxScore and outcomes.score hold the same value.
For newly created question responseDecleration
and outcomeVariables
will be like this for single select MCQ:
Code Block |
---|
"responseDeclaration": { "response1": { min"cardinality": number"single", max"type": number"integer", } } |
If we have the time limit for each of the question we can store the time limit to the question set metadata
Code Block | ||
---|---|---|
| ||
timeLimits: { question"correctResponse": { min "value": number"0", max: number}, } } |
Note: The timer field in the question set editor is part of the common form which is taking maxTime
and warningTime
as input.
We can keep on using the same configuration for the field in the form configuration keeping maxTime
and warningTime
and in editor code we can handle maxTime
with max
and warningTime
with min
.
responseDeclaration
Response Declaration is currently stored in below format but two properties are not allowed in it, which are: maxScore
and outcomes
Code Block |
---|
"responseDeclaration": { "mapping": [] } }, "response1outcomeVariables": { "maxScore": 1, "maxScore": 1, // maxScore is not allowed here} |
and responseProcessing
will have above format.
For newly created question responseDecleration
and outcomeVariables
will be like this for multi select MCQ:
Code Block |
---|
"responseDeclaration": { "response1": { "cardinality": "singlemultiple", "type": "integer", "correctResponse": { "value": "0"[0, 1], }, "outcomes "mapping": [{ "SCOREresponse": 10, } // outcome is not allowed here, only property ‘value’ is allowed "outcomes": { }, "score": 1 "mapping": [] } } |
Proposed Solution for responseDeclaration
Instead of keeping maxScore
and outcomes
in responseDeclaration
we can store it in responseProcessing
as below:
Code Block |
---|
responseProcessing: { "template": [ "MAP_RESPONSE"}, ], "mappingConfig": [{ "SCORE": 1,{ "outcomes": { "SCOREresponse": 1, } }] } |
For newly created question responseDecleration
will be like this:
Code Block |
---|
"responseDeclaration"outcomes": { "response1": { "cardinalityscore": "single",1 "type": "integer", } "correctResponse": { } "value": "0", ] }, }, "mappingoutcomeVariables": []{ }"maxScore": 2, } |
...
How to take care of old questions created by question set editor and getting consumed in QuML-Player?
With Migration
we can do the data migration for the old questions and update the question with above mentioned format.
Without Data Migration
Make editor intelligent to check if the question have responseProcessing
. If responseProcessing
does not exists, update the question’s responseDeclartion
and responseProcessing
format on question update.
Open Questions for no data migration:-
Is updating the question format to be done on question set update( having n number of questions in question set) or to be updated on each question edit and update in Practise Question set?
How the editor and player should handle the old questions which are in review/live status?
...
Editor opened by reviewer in review mode: In this format is the editor/player is supposed to take care to pick the data from responseDeclaration
and not from responseProcessing
...
For the new question creation we will store the maxScore inside the outcomeVariables.
If user edits the old question, we will store the maxScore inside the outcomeVariables and remove the maxScore from the responseDeclartion.
For the live questions - player will first check if the question have outcomeVariables and what’s the maxScore value present in it, if outcomeVariables is not found player will check the maxScore in responseDeclartion to pickup the maxScore.
media
Currently question metadata question contains media in this format:
...
Code Block |
---|
"media": [{ "id": "do_2136952965043896321346", "mediaType": "image", "src": "/assets/public/content/assets/do_2136952965043896321346/mountain.jpeg", "baseUrl": "https://dev.inquiry.sunbird.org" }] |
With Migration
we can do the data migration for the old questions and update the question with above mentioned format.
Without migration
For the old questions new question creation we will store the media in new format.
If user edits the old question, we can check if type
is present in the media object, convert it to mediaType
while editing the question.
Open Questions
How can we change type
to mediaType
for live questions ?For the live questions - player will first check if the question media have mediaType
property if not it will check in type
property.
Questionset metadata which have some differences from the QuML specs is :-
timeLimits
timeLimits
Time limits is currently being stored in the question set metadata in below format:
Code Block | ||
---|---|---|
| ||
timeLimits: {
"maxTime": "360",
"warningTime": "120"
} |
The use of maxTime is show the timer on questionset player and warningTime is used to show the timer in red color indicating your are left with only these few minutes to complete the questionset.
...
But as per the QuML schema it should be stored in the below format:
Code Block | ||
---|---|---|
| ||
timeLimits:
{
"description": "Time limits for the complete set and/or for each question in the question set.",
questionset: {
min: number,
max: number
},
question: {
min: number,
max: number
}
} |
Proposed Solution for timeLimits
We can set the limit for the complete question set as:
Code Block | ||
---|---|---|
| ||
timeLimits:
{
questionset: {
min: number,
max: number
}
} |
If we have the time limit for each of the question we can store the time limit to the question set metadata
Code Block | ||
---|---|---|
| ||
timeLimits:
{
question: {
min: number,
max: number
}
} |
Note: The timer field in the question set editor is part of the common form which is taking maxTime
and warningTime
as input.
We can keep on using the same configuration for the field in the form configuration keeping maxTime
and warningTime
and in editor code we can handle maxTime
with max
and warningTime
with min
.
With Migration
we can do the data migration for the old questions and update the question with above mentioned format.
Without Data Migration
For the new question creation we will store the timeLimits in new format.
If user edits the old question, we will check for the timeLimits if it’s present in old format we will convert it to new format on save.
For the live questions - player will first check if the question have timeLimits.questionset it will take the min and max value for there, if timeLimits.questionset is undefined and timeLimits directly maxTime and warningTime it will take the value for there.