Background
We have received the MTF Question contribution in the C4GT 2023 program for the editor and the code is merged one of the feature branch.
Player side implementation is not done yet, before starting the player implementation we need to re-look into the MTF data model if it’s as per the QuML spec and if any improvement can be done in it to make it easy to understand.
Data Model of MTF Question
body
<div class='question-body' tabindex='-1'>
<div class='mtf-title' tabindex='0'>
<p>Match the colour with the fruits.</p>
</div>
<div data-match-interaction='response1' class='mtf-horizontal'></div>
</div>Question body is per the QuML spec
responseDeclaration - C4GT 2023 contributed Format
C4GT contribution exits in feature branch - C4GT_Issue_42
{
"response1": {
"cardinality": "multiple",
"type": "map",
"correctResponse": {
"value": [
{
"0": 0
},
{
"1": 1
},
{
"2": 2
},
{
"3": 3
}
]
},
"mapping": [
{
"value": {
"0": 0
},
"score": 0.25
},
{
"value": {
"1": 1
},
"score": 0.25
},
{
"value": {
"2": 2
},
"score": 0.25
},
{
"value": {
"3": 3
},
"score": 0.25
}
]
}
}responseDeclaration is as per the QuML spec
But above format of responseDeclaration it not self explanatory
Here are few new proposed Format for responseDeclaration
Cardinality for MTF Question should be "cardinality": "ordered"
Format1 (Recommended)
Format2
Format3
Final Format of responseDeclaration: ?
Note - cardinality enum should be changed in inQuiry schema to fit in "cardinality": "ordered"
Since MTF and Arrange Sequence question is type of question where score is calculated based on order of response, the cardinality should be ordered. Refer QuML spec - cardinality
outcomeDeclaration
{
"maxScore": {
"cardinality": "ordered",
"type": "integer",
"defaultValue": 1
}
}For more info on outcomeDeclarartion - refer , reference2
interactions
{
"response1": {
"type": "match",
"options": {
"left": [
{
"label": "<p>Red</p>",
"value": 0
},
{
"label": "<p>Yellow</p>",
"value": 1
},
{
"label": "<p>Green</p>",
"value": 2
},
{
"label": "<p>Orange</p>",
"value": 3
}
],
"right": [
{
"label": "<p>Apple</p>",
"value": 0
},
{
"label": "<p>Banana</p>",
"value": 1
},
{
"label": "<p>Grapes</p>",
"value": 2
},
{
"label": "<p>Orange</p>",
"value": 3
}
]
},
"validation": {
"required": "Yes"
}
}
}Question interactions is of type object so it is as per the QuML spec
editorState
editorState Stores editor specific data.
templateId
"templateId": "mtf-horizontal" / "mtf-vertical"primaryCategory
"primaryCategory": "Match The Following Question"qType
"qType": "MTF"interactionTypes
"interactionTypes": ["match"]