Versions Compared

Key

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

...

...

...

...

...

...

...

...

...

...

...

...

Table of Contents
minLevel1
maxLevel7

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
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 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
languagejson
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:

...

languagejson

...

a few gaps. Below are the properties having some differences from the QuML specs:

Question metadata which has some differences from the QuML specs are:-

  • responseDeclaration

  • media

responseDeclaration

Currently, the responseDeclaration is stored in the below format but maxScore is not allowed in it and   outcomes property is not allowed inside correctResponse

Code Block
"responseDeclaration": {
       "response1": {
           "maxScore": 1, // maxScore is not allowed here
           "cardinality": "single",
           "type": "integer",
           "correctResponse": {
               "value": "0",
               "outcomes": {
           min: number,            max"SCORE": number1
   },    question: {       } // outcome is not min:allowed numberhere, only property ‘value’ is allowed
      max: number    }
}

Proposed Solution for timeLimits

We can set the limit for the complete question set as:

Code Block
languagejson
timeLimits:
{,
     questionset: {            min: number,"mapping": []
           max: number}
   } }

If we have the time limit for each of the question we can store the time limit to the question set metadata

...

languagejson

...

Proposed Solution for responseDeclaration

Editor Changes:

Instead of keeping maxScore and outcomes in responseDeclaration we can store maxScore in outcomeDeclaration as below:

Code Block
"outcomeDeclaration": {
   question "maxScore": {
      "cardinality": "single",
     min "type": number"integer",
      "defaultValue": 3
   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 warningTimeand in editor code we can handle maxTime with max and warningTime with min.

responseDeclaration

...

,

We will not store outcomes.score inside correctResponse because maxScore and outcomes.score holds the same value.

For newly created single select MCQ question responseDecleration and outcomeDeclaration will be stored in the below format:

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

Proposed Solution for responseDeclaration

Instead of keeping maxScore and outcomes in responseDeclaration we can store it in responseProcessing as belowFor multi-select MCQ, responseDecleration and outcomeDeclaration will be in the below format:

Code Block
responseProcessing"responseDeclaration": {
    "templateresponse1": [{
      "cardinality": "MAP_RESPONSEsingle",

  ],    "mappingConfigtype": [{"integer",
       "SCOREcorrectResponse": {
1,        "outcomesvalue": {[2,1]
      },
      "SCOREmapping": 1 [
        {
     }    }] }

For newly created question responseDecleration will be like this:

Code Block
"responseDeclaration"value": {2,
          "response1score": { 0.5
        },
      "cardinality": "single", {
          "typevalue": "integer"1,

          "correctResponsescore": { 0.5
        }
      ]
    }
  },
  "valueoutcomeDeclaration": {
    "0maxScore",: {
      "cardinality": "single",
  },    "type": "integer",
      "mappingdefaultValue": []
  1
    }

  },

We will store the maxScore inside the outcomeDeclaration property for new question creation using v2 API.

  • No Data Migration (Recommended)

...

    • We will do these changes as part of the v2 API and will give the data in the above format.

How to take care of old questions created by question set editor and getting consumed in QuML-Player?

  • With Migration

...

    • If a user edits the old question using v2 API, We will store maxScore inside the outcomeDeclaration and remove the maxScore from the responseDeclaration.

  • Data Migration (Not Recommended)

    • We can do the data migration for the old questions and update the question metadata with the format mentioned above

...

  • 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:-

  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/player is 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

...

    • .

    • This solution is not recommended because, with the migration of old questions, the old mobile app will break.

Player Changes:
  • The player will check if the question is having the outcomeDeclaration in the metadata of the question and what’s the maxScore value present in it.

  • If the outcomeDeclaration property is found then the player will use it as is it.

  • If the question does not have the outcomeDeclaration property in the metadata then the player will look for the maxScore property in the responseDeclartion.

media

Currently, Question metadata contains media in the below 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"
}]

As per QuML specs, it should be stored in the below format:

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

Without migration

...

Proposed Solution for media

Editor Changes:
  • Update QuML specs (Recommended)

    • If we can update the QuML spec then change will not be required in the editor and player.

  • No Data Migration (Recommended)

    • If we are not updating the QuML specs then we have to do the following changes:

      • For the new question creation, we will store the media in a new format using v2 API.

      • If the user edits the old question using v2 API, we will check if the type is present in the media object, and convert it to mediaType while editing the question.

Open Questions

...

  • No migration (Not Recommended)

    • We can do the data migration for the old questions and update the question with the above-mentioned format.

    • This solution is not recommended because, with the migration of old questions, the old mobile app will break.

Player Changes:

(Note: Following changes will not be required if we are updating the QuML specs as mentioned above).

  • The player will first check if the question media have mediaType property if not it will check in type property.

...

QuestionSet metadata which has some differences from the QuML specs is:-

  • timeLimits

timeLimits

Time limits are currently being stored in the question set metadata as below:

Code Block
languagejson
timeLimits: {
   "maxTime": "240",
   "warningTime": "60"
}

The use of maxTime is to show the timer on the QuML player and the use of warningTime is to indicate the time remaining to complete the question set.

...

But as per the QuML schema, timeLimits` should be stored in the below format:

Code Block
languagejson
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 timeLimits for the question set as:

Code Block
languagejson
timeLimits:
{
   questionset: {
           min: number,
           max: number,
           warn: number // update the QuML specs
           
   }
}

If we have a time limit for each of the questions we will store the timeLimits to the question set metadata as:

Code Block
languagejson
timeLimits:
{
   question: {
           min: number,
           max: number,
           warn: number // update the QuML specs
   }
}

If we want to store max and warn value but don't want to store min value we can store the data in the below format:

Code Block
languagejson
timeLimits:
{
   questionset: {
           min: null,
           max: 240,
           warn: 60
           
   }
}

We will have to update the QuML spec so the warn time should be stored inside timeLimits

Editor Changes:
  • No Data Migration (Recommended)

    • For the new question creation, we will store the timeLimits in a new format using v2 API.

    • If the user edits the old question using V2 API, we will check for the timeLimits if it's present in the old format we will convert it to the new format on save.

  • Data Migration (Not Recommended)

    • we can do the data migration for the old questions and update the question with the above-mentioned format.

Player Changes:

The player will first check if the question has timeLimits.questionset it will take the min and warn value from there, if timeLimits.questionset is undefined and timeLimits directly contains maxTime and warningTime it will take the value from there.