Versions Compared

Key

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

...

responseDeclaration is contain the expected matching indices when comparing the user answers against the expected answers array.

Here’s the new schema structure for the FTB which is as per QuML compliance. 

Solution 1 (Recommended) :

Code Block
{
  "editorState": {
    "options": [
      {
        "answer": true,
        "value": {
          "body": "New Delhi",
          "value": 0
        }
      },
      {
        "answer": true,
        "value": {
          "body": "New York",
          "value": 1
        }
      }
    ],
    "question": "<figure class="image"><img src="/assets/public/content/assets/do_2136875567564144641233/download.jpg" alt="download" data-asset-variable="do_2136875567564144641233"></figure><figure class="image"><img src="/assets/public/content/assets/do_2136875567564144641233/download.jpg" alt="download" data-asset-variable="do_2136875567564144641233"></figure>
        <p>capital of india is [[New Delhi]]. and capital of USA is [[New York]]</p>"
  },
  "body": "<p>capital of india is [[New Delhi]]. and capital of USA is [[New York]]</p>"
  },
  "bodyresponseDeclaration": "<figure class="image"><img src="/assets/public/content/assets/do_2136875567564144641233/download.jpg" alt="download" data-asset-variable="do_2136875567564144641233"></figure>{
    "response1": {
      "cardinality": "single",
      "type": "string",
      "correctResponse": {
<p>capital of india is [[New Delhi]]. and capital of USA is"value": [["New York]]</p>Delhi", "New  York"interactions":]
{     "response1": { },
      "typemapping": "text",[
       "options": [{
          "labelresponse": "New Delhi",
          "valueoutcomes": 0{
        },    "score": 0.5
   {       }
     "label   },
        {
          "response": "New York",
          "valueoutcomes": 1{
            }
"score": 0.5
     ]     },
      "validation": { }
     "required": "Yes" ]
    }
  },
  "responseDeclarationoutcomeDeclaration": {
    "response1maxScore": {1
  },
   "cardinalityinteractionTypes": "multiple",
   [
    "type": "string",text"
  ],
   "correctResponsemedia": {[
    {
      "valueid": ["do_2136875567564144641233",
          "0"type": "image",
          "1""src": "/assets/public/content/assets/do_2136875567564144641233/download.jpg",
        ]
"baseUrl": "https://dev.inquiry.sunbird.org"
     },
   ],
  "mappingname": ["Fill In The Blanks",
     {
 "mimeType": "application/vnd.sunbird.question",
        "response"objectType": 0"Question",
  "primaryCategory": "FTB Question",
     "outcomesqType": {
            "score": 0.5
          }
        },
        {
          "response": 1,
          "outcomes": {
            "score": 0.5
          }
        }
      ]
    }
  },
  "outcomeDeclaration": {
    "maxScore": 1
  },
  "interactionTypes": [
    "text"
  ],
  "media": [{
    "id": "do_2136875567564144641233",
    "type": "image",
    "src": "/assets/public/content/assets/do_2136875567564144641233/download.jpg",
    "baseUrl": "https://dev.inquiry.sunbird.org"
  }],
  "name": "Fill In The Blanks",
  "mimeType": "application/vnd.sunbird.question",
  "objectType": "Question",
  "primaryCategory": "FTB Question",
  "qType": "FTB",
  "keyboardConfig": {
    "type": "Device",
    "customKeys": ""
  }
}

Pros:

  • This structure is similar to the existing MCQ question structure.

Cons:

  • The player needs to perform more operations to evaluate the question as we are storing the value as an index under responseDeclaration.

  • Interactions for FTB will only be used for getting the matching indices when comparing the user answers against the expected answers array.

Solution 2:

Code Block
{
  "editorState": {
    "options": ["FTB"
}

In QuML spec https://github.com/sunbird-specs/QuML/blob/master/v1/question-schema.json#L344 the mapping definition does not allow storing of value as string, it’s value type is defined as number

We need to update the spec to support this schema structure.

Pros:

  • This approach requires minimal effort to implement.

  • Creating the views for both editor and player becomes easier with this structure.

  • No need to store the interaction properties as we are storing values as it is.

  • Reduce the payload size compare to solution 1 and solution 2.

  • Players can easily evaluate the question by comparing the user answers against the expected correctResponse array.

Cons:

  • The proposed structure is different from the current structure supported by the QuML spec.

Solution 2:

Code Block
{
  "editorState": {
    "options": [{
        "answer": true,
        "value": {
          "body": "New Delhi",
          "value": 0
        }
      },
      {
        "answer": true,
        "value": {
          "body": "New DelhiYork",
          "value": 01
        }
      }],
    "question": "<figure  {
        "answer": true,
        "value": {class="image"><img src="/assets/public/content/assets/do_2136875567564144641233/download.jpg" alt="download" data-asset-variable="do_2136875567564144641233"></figure><figure class="image"><img src="/assets/public/content/assets/do_2136875567564144641233/download.jpg" alt="download" data-asset-variable="do_2136875567564144641233"></figure>
        <p>capital of india "body": "New York",
          "value": 1
     is [[New Delhi]]. and capital of USA is [[New York]]</p>"
  },
  "body": "<figure class="image"><img  }
src="/assets/public/content/assets/do_2136875567564144641233/download.jpg" alt="download" data-asset-variable="do_2136875567564144641233"></figure>
   ],     "question": "  <p>capital of india is [[New Delhi]]. and capital of USA is [[New York]]</p>",
  "interactions": {
 },   "bodyresponse1": "<p>capital{
of india is [[New Delhi]]. and capital of USA is [[New York]]</p>","type": "text",
      "interactionsoptions": [{
          "response1label": {"New Delhi",
          "typevalue": "text",0
       "options": [ },
        {
          "label": "New DelhiYork",
          "value": 01
        }
      ]
    },
    "response2validation": {
      "required": "Yes"
    }
  },
  "responseDeclaration": {
    "response1": {
      "typecardinality": "textmultiple",
      "optionstype": ["string",
       "correctResponse": {

         "labelvalue": "New York",[
          "value0":,
1         } "1"
     ]   ]
 },     "validation": {
},
      "requiredmapping": "Yes"
[
   }   },   "responseDeclaration": {
    "response1": {       "cardinalityresponse": "single"0,
      "type": "string",       "correctResponseoutcomes": {
            "valuescore": "0"0.5
          },
       "mapping": [ },
        {
          "response": "0"1,
          "outcomes": {
            "score": 0.5
          }
        }
      ]
    }
  },
  "outcomeDeclaration": {
    "maxScore": 1
  },
  "interactionTypes": [
}    "text"
  ],
  "media": [{
},     "response2id": {"do_2136875567564144641233",
      "cardinalitytype": "singleimage",

     "typesrc": "string/assets/public/content/assets/do_2136875567564144641233/download.jpg",

     "correctResponsebaseUrl": {
 "https://dev.inquiry.sunbird.org"
   }],
  "valuename": "1"Fill In The Blanks",
   }"mimeType": "application/vnd.sunbird.question",
  "objectType": "Question",
  "mappingprimaryCategory": ["FTB Question",
  "qType": "FTB",
  "keyboardConfig": {
     
    "responsetype": "1Device",
          "outcomes"customKeys": {""
  }
}

Pros:

  • This structure is similar to the existing MCQ question structure.

Cons:

  • The player needs to perform more operations to evaluate the question as we are storing the value as an index under responseDeclaration.

  • Interactions for FTB will only be used for getting the matching indices when comparing the user answers against the expected answers array.

Solution 3:

Code Block
{
  "editorState": {
    "scoreoptions": 0.5[
      {
   }     "answer": true,
  }      "value": ]{
    }   },   "outcomeDeclarationbody": {"New Delhi",
   "maxScore": 1   },   "interactionTypesvalue": [0
    "text"   ], }
 "media": [    },
{      {
"id": "do_2136875567564144641233",       "typeanswer": "image"true,
        "srcvalue": "/assets/public/content/assets/do_2136875567564144641233/download.jpg", {
          "baseUrlbody": "https://dev.inquiry.sunbird.org"New York",
    }   ],   "namevalue": "Fill In The Blanks",
  "mimeType": "application/vnd.sunbird.question",
  "objectType": "Question",
  "primaryCategory": "FTB Question"1
        }
      }
    ],
    "qTypequestion": "FTB",
  "keyboardConfig": {
    "type": "Device",
 <p>capital of india is [[New Delhi]]. and capital of USA is [[New York]]</p>"
  },
  "customKeysbody": ""<p>capital of india is }
}

Pros:

  • This structure can define separate behavior for each response.

  • Support multiple data types for each response.

Cons:

  • Increase the player complexity to evaluate the question.

  • Increase the question payload size as we are storing each answer in a separate response for multiple properties.
    For example, response1 and response2 have similar structures. As the number of responseVariables increases this structure will repeat multiple times and each will be storing the same data such as cardinality, type

Solution 3:

Code Block
{
  "editorState": {[[New Delhi]]. and capital of USA is [[New York]]</p>",
  "interactions": {
    "response1": {
      "type": "text",
      "options": [
        {
          "answerlabel": "New trueDelhi",
          "value": {0
        }
      ]
    },
    "bodyresponse2": "New Delhi",{
      "type": "text",
      "options": [
        {
          "valuelabel": 0 "New York",
        }  "value": 1
   },     }
 {     ]
   "answer": true},
        "valuevalidation": {
          "bodyrequired": "New YorkYes",
    }
  },
  "valueresponseDeclaration": 1{
    "response1": {
  }    "cardinality": "single",
 }     ],
    "question"type": "string"<p>capital,
of india is [[New Delhi]]. and capital of USA is [[New York]]</p>""correctResponse": {
      },   "bodyvalue": "0"<p>capital
of india is [[New Delhi]]. and capital},
of USA is [[New York]]</p>",   "responseDeclarationmapping": [
     {   {
 "response1":  {       "cardinalityresponse": "single0",
          "typeoutcomes": "string",{
            "correctResponsescore": {0.5
        "value": ["New Delhi", "New York"] }
        },
      ]
"mapping": [   },
    "response2": {
      "cardinality": "single",
       "responsetype": "New Delhistring",
  
       "outcomescorrectResponse": {
 
          "scorevalue": 0.5"1"
          },
        },"mapping": [
        {
          "response": "New York1",
          "outcomes": {
            "score": 0.5
          }
        }
      ]
    }
  },
  "outcomeDeclaration": {
    "maxScore": 1
  },
  "interactionTypes": [
    "text"
  ],
  "media": [
    {
      "id": "do_2136875567564144641233",
      "type": "image",
      "src": "/assets/public/content/assets/do_2136875567564144641233/download.jpg",
      "baseUrl": "https://dev.inquiry.sunbird.org"
    }
  ],
  "name": "Fill In The Blanks",
  "mimeType": "application/vnd.sunbird.question",
  "objectType": "Question",
  "primaryCategory": "FTB Question", Question",
  "qType": "FTB",
  "keyboardConfig": {
    "type": "Device",
    "qTypecustomKeys": "FTB"
  }
}

Pros:

  • This approach requires minimal effort to implement.

  • Creating the views for both editor and player becomes easier with this structure.

  • No need to store the interaction properties as we are storing values as it is.

  • Reduce the payload size compare to solution 1 and solution 2.

  • Players can easily evaluate the question by comparing the user answers against the expected correctResponse array.

Cons:

  • The proposed structure is different from the current structure supported by the QuML spec.structure can define separate behavior for each response.

  • Support multiple data types for each response.

Cons:

  • Increase the player complexity to evaluate the question.

  • Increase the question payload size as we are storing each answer in a separate response for multiple properties.
    For example, response1 and response2 have similar structures. As the number of responseVariables increases this structure will repeat multiple times and each will be storing the same data such as cardinality, type