Versions Compared

Key

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

Background

While comparing the existing inQuiry question and question set metadata and schema with QuML schema we found few difference which is mentioned in the below sheet:

...

How to make existing metadata properties QuML complaints :-Probem 1-

  1. Multi-lingual support

Some of the properties are supposed to be stored in i18nData form i.e language code and it’s value

...

The properties of question set which is to be stored in i18n form are:

  • instructions (text)

  • feedback (currently not in use)

  • hints (currently not in use)

The properties of question set which is to be stored in i18n form 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)

Solution For multi-Lingual support:

For adding instructions in question set with language code, we will add a language drop down field in the question set form.

...

Code Block
languagejson
{
	"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 will have in question creation page to have a language drop down field and based on selection we can transform the data while question creation/ update.

timeLimits

Time limits is currently being stored in the question set metadata in below format:

Code Block
languagejson
timeLimits: {
   "maxTime": "360",
   "warningTime": "120"
}

But as per the QuML schema it should be stored in this format:

Code Block
languagejson
timeLimits:
{
   questionset: {
           min: number,
           max: number
   },
   question: {
           min: number,
           max: number
   }
}

Solution for timeLimits

Timer feature is developed for complete question set and not for the individual question.

We can store the time limits as:

Code Block
languagejson
timeLimits:
{
   questionset: {
           min: number,
           max: number
   }
}

If the timer feature is developed for question in future we can store the timer data to question metadata as:

Code Block
languagejson
timeLimits:
{
   question: {
           min: number,
           max: number
   }
}

Note: The above field is part of the common form so in the form config we will be using maxTime and warningTime and in editor code we will handle maxTime with max and warningTime with min.

responseDeclaration 

Response Declaration is currently stored as below format but two properties are not allowed in it: maxScore and  outcomes

Code Block
"responseDeclaration": {
       "response1": {
           "maxScore": 1, // maxScore is not allowed here
           "cardinality": "single",
           "type": "integer",
           "correctResponse": {
               "value": "0",
               "outcomes": {
                   "SCORE": 1
               } // outcome is not allowed here, only property ‘value’ is allowed
           },
           "mapping": []
       }
   }

Solution for responseDeclaration

Instead of keeping maxScore and outcomes in responseDeclaration we should store it in responseProcessing as below:

Code Block
responseProcessing: {
   "template": [
       "MAP_RESPONSE",
   ],
   "mappingConfig": [{
       "SCORE": 1,
       "outcomes": {
           "SCORE": 1
       }
   }]
}

For newly created question responseDecleration will be like this:

Code Block
"responseDeclaration": {
       "response1": {
           "cardinality": "single",
           "type": "integer",
           "correctResponse": {
               "value": "0",
           },
           "mapping": []
       }
   }

and responseProcessing will have above format.

For old question we do either the data migration and update the question with above mentioned format,

or making 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:-

  1. 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?

  2. 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 supposed to take care to pick the data from responseDeclaration and not from responseProcessing

  • What happens if reviewer tries to publish the question which is not having responseProcessing?

media

In question metadata question contains media in this format:

Code Block
"media": [{
   "id": "do_2136952965043896321346",
   "type": "image", //instead of ‘type’ it should be ‘mediaType’
   "src": "/assets/public/content/assets/do_2136952965043896321346/mountain.jpeg",
   "baseUrl": "https://dev.inquiry.sunbird.org"
}]

New format to be used is:

Code Block
"media": [{
   "id": "do_2136952965043896321346",
   "mediaType": "image",
   "src": "/assets/public/content/assets/do_2136952965043896321346/mountain.jpeg",
   "baseUrl": "https://dev.inquiry.sunbird.org"
}]

Open Question:

Can we do migration for old questions for this change of type to mediaType ?