Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

Background

While comparing the existing inQuiry question and question set metadata with QuML specs we found 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

Editor Changes

Currently, the Response declaration is stored in the below format but there are two properties that are not allowed in it, which are: maxScore and  outcomes

"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": []
       }
   }

Proposed Solution for responseDeclaration

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

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

"responseDeclaration": {
       "response1": {
           "cardinality": "single",
           "type": "integer",
           "correctResponse": {
               "value": "0",
           },
           "mapping": []
       }
   },
   "outcomeVariables": {
       "maxScore": 1,
   }

and responseProcessing will have above format.

For newly created question responseDecleration and outcomeVariables will be like this for multi select MCQ:

"responseDeclaration": {
       "response1": {
           "cardinality": "multiple",
           "type": "integer",
           "correctResponse": {
               "value": [0, 1],
           },
           "mapping": [{
                  "response": 0,
                  "outcomes": {
                    "score": 1
                  }
                },
                {
                  "response": 1,
                  "outcomes": {
                    "score": 1
                  }
                }
           ]
       }
   },
   "outcomeVariables": {
       "maxScore": 2,
   }

Implementation approach

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

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

"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 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.

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:

timeLimits: {
   "maxTime": "240",
   "warningTime": "60"
}

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:

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:

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

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 warningTimeand 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.

  • No labels