Versions Compared

Key

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

Background

...

Data Model of MTF Question

...

body

Expand
titleQuestion body
Code Block
languagehtml
`<div
<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>`
div>

Question is body is of type string so it is as per the QuML spec

MTF interactions

...

titleinteraction having both left and right match pairs

...

languagejson

...

responseDeclaration

Code Block
{
        "response1": {
            "
type
cardinality": "
match
multiple",
            "
options
type": 
{
"map",
            "
left
correctResponse": 
[
{
                
{
"value": [
                    
"label": "<p>Red</p>",
{
                        "
value
0": 0
                
},
    },
            
{
        {
            
"label":
 
"<p>Yellow</p>",
           
"1": 1
  
"value":
 
1
                 },
                
{
    {
                
"label":
 
"<p>Green</p>",
       
"2": 2
          
"value":
 
2
         },
       
},
             {
   
{
                     "
label
3": 
"<p>Orange</p>",
3
                    
"value":
}
3
                ]
}
            
]
},
            "
right
mapping": [
                {
                    "
label
value":
"<p>Apple</p>",
 {
                        "
value
0": 0
                    },
                
{
    "score": 0.25
               
"label": "<p>Banana</p>"
 },
                {
   
"value":
 
1
                
},
"value": {
                        
{
"1": 1
                   
"label": "<p>Grapes</p>"
 },
                    "
value
score": 
2
0.25
                },
                {
                    "
label
value":
"<p>Orange</p>",
 {
                        "
value
2": 
3
2
                
}
    },
        
]
         
},
   "score": 0.25
    
"validation":
 
{
           },
 
"required":
 
"Yes"
         
}
     
} }

Question interactions is of type object so it is as per the QuML spec

MTF responseDeclaration

{

      
"response1":
 
{
             "
cardinality
value": 
"multiple",
{
            
"type":
 
"map",
           
"
correctResponse
3": 3
{
                 
"value":
 
[
  },
                  
{
  "score": 0.25
                }
    
"0":
 
0
       ]
        }
    }
,
Expand
titleresponseDeclaration of Question
Code Block
languagejson

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

Expand
titleProposed Format1 of responseDeclaration:
Code Block
languagejson
{
    "response1": {
        "cardinality": "ordered",
      {  "type": "map",
        "correctResponse": {
            "1value": 1[
                {
   },                     {
"lhs": 0,
                       "2rhs": 0
2                },
    },            {
        {            "lhs": 1,
           "3": 3        "rhs": 1
           }     },
           ]     {
       },             "mappinglhs": [2,
                {       "rhs": 2
             "value": {  },
                {
     "0": 0                     }"lhs": 3,
                    "scorerhs": 0.253
                },
            ]
   {     },
        "mapping": [
     "value": {        {
                "1value": {
1                    "lhs": }0,
                    "scorerhs": 0.25
                },
                {
"score": 0.25
            },
      "value": {       {
                 "2value": {
2                    "lhs": }1,
                    "scorerhs": 0.251
                },
                "score": 0.25
            },
        {    {
                "value": {
                    "lhs": 2,
   "3": 3                 "rhs": 2
            },    },
                "score": 0.25
            },
    }
        {
           ]     "value": {
  }        }

responseDeclaration is as per the QuML spec

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

Expand
titleProposed Format1 of responseDeclaration:
Code Block
languagejson
{          "lhs": 3,
          "response1": {         "cardinalityrhs": 3
"ordered",         "type": "map",      },
  "correctResponse": {             "valuescore": [0.25
            }
        {]
    }
}

Format2

Expand
titleProposed Format2 of responseDeclaration:
Code Block
languagejson
{
    "response1": {
        "lhscardinality": 0"ordered",
           "type": "map",
        "rhscorrectResponse": 0{
                },"value": [
                {
                    "lhsleftIndex": 10,
                    "rhsrightIndex": 10
                },
                {
                    "lhsleftIndex": 21,
                    "rhsrightIndex": 21
                },
                {
                    "lhsleftIndex": 3,
                    "rhs": 3
                }
         2,
  ]         },         "mappingrightIndex": [2
               { },
               "value": {
                    "lhsleftIndex": 03,
                    "rhsrightIndex": 03
                },
            ]
    "score": 0.25   },
         },"mapping": [
            {
                "value": {
                    "lhsleftIndex": 10,
                    "rhsrightIndex": 10
                },
                "score": 0.25
            },
            {
                "value": {
                    "lhsleftIndex": 21,
                    "rhsrightIndex": 21
                },
                "score": 0.25
            },
            {
                "value": {
                    "lhsleftIndex": 3,
                    "rhs": 3
                },
                "score": 0.252,
               }     "rightIndex": 2
  ]     } }

Format2

Expand
titleProposed Format2 of responseDeclaration:
Code Block
languagejson
{     "response1": {  },
      "cardinality": "ordered",         "typescore": "map", 0.25
           "correctResponse": { },
            "value":{
[                "value": {
                    "leftIndex": 03,
                    "rightIndex": 03
                },
                {
"score": 0.25
            }
      "leftIndex": 1, ]
       }
}

Since the value in lhs/rhs or leftIndex/rightIndex are index of the options, Format2 seems to make more sense.

Final Format of responseDeclaration: ?

outcomeDeclaration

Code Block
{
        
"
rightIndex
maxScore": 
1
{
            
}
"cardinality": "multiple",
            "type": "integer",
  
{
          "defaultValue": 1
        },
"leftIndex":
 
2,
       "hint": {
            "
rightIndex
cardinality": 
2
"single",
            "type": "string",
    
},
        "defaultValue": "098eacc6-07fd-45ba-9e3c-372042154cd3"
       
{
 }
    }

outcomeDeclarartion of MTF is similar MCQ which is as per QuML compliant.

For more info on outcomeDeclarartion - refer

interactions

Code Block
{
    "response1": {
        "
leftIndex
type": 
3,
"match",
        "options": {
  
"rightIndex":
 
3
         "left": [
      
}
          {
  
]
         
},
         "
mapping
label":
[
 "<p>Red</p>",
               
{
     "value": 0
          
"value":
 
{
     },
               
"leftIndex": 0,
 {
                    "
rightIndex
label": 
0
"<p>Yellow</p>",
                
},
    "value": 1
           
"score":
 
0.25
    
},
       
},
         {
   
{
                 "
value
label": 
{
"<p>Green</p>",
                    "
leftIndex
value": 
1,
2
                
},
  
"rightIndex":
 
1
             {
   
},
                 "
score
label": 
0.25
"<p>Orange</p>",
            
},
        "value": 3
   
{
             }
   
"value":
 
{
        ],
            "
leftIndex
right": 
2,
[
                {
   
"rightIndex":
 
2
                
},
"label": "<p>Apple</p>",
                    "
score
value": 0
.25

                },
                {
                    "
value
label": 
{
"<p>Banana</p>",
                    "
leftIndex
value": 
3,
1
                
},
  
"rightIndex":
 
3
             {
   
},
                 "
score
label": 
0.25
"<p>Grapes</p>",
                
}
    "value": 2
   
]
     
} }

Since the value in lhs/rhs or leftIndex/rightIndex are index of the options, Format2 seems to make more sense.

Final Format of responseDeclaration: ?

MTF outcomeDeclaration

{
        },
         
"maxScore":
 
{
      {
      
"cardinality":
 
"multiple",
             "
type
label": "
integer
<p>Orange</p>",
            
"defaultValue
        "value": 3
 
1
         
},
      }
  
"hint":
 
{
         ]
   
"cardinality":
 
"single",
    },
        "
type
validation": 
"string",
{
            "
defaultValue
required": "
098eacc6-07fd-45ba-9e3c-372042154cd3
Yes"
        }
    }
}
Expand
titleoutcomeDeclaration of Question
Code Block
languagejson

outcomeDeclarartion of MTF is similar MCQ which is QuML compliant.

Q- What should be cardinality here ?

For more info on outcomeDeclarartion - refer

...

Question interactions is of type object so it is as per the QuML spec

editorState

Expand
titleeditorState of Question
Code Block
languagejson
{
    "options": {
        "left": [
            {
                "value": {
                    "body": "<p>Red</p>",
                    "value": 0
                }
            },
            {
                "value": {
                    "body": "<p>Yellow</p>",
                    "value": 1
                }
            },
            {
                "value": {
                    "body": "<p>Green</p>",
                    "value": 2
                }
            },
            {
                "value": {
                    "body": "<p>Orange</p>",
                    "value": 3
                }
            }
        ],
        "right": [
            {
                "value": {
                    "body": "<p>Apple</p>",
                    "value": 0
                }
            },
            {
                "value": {
                    "body": "<p>Banana</p>",
                    "value": 1
                }
            },
            {
                "value": {
                    "body": "<p>Grapes</p>",
                    "value": 2
                }
            },
            {
                "value": {
                    "body": "<p>Orange</p>",
                    "value": 3
                }
            }
        ]
    },
    "question": "<p>Match the colour with the fruits.</p>",
    "solutions": [
        {
            "id": "3fe0e600-9746-4673-81a9-3429af3fef41",
            "type": "html",
            "value": "<figure class=\"table\"><table><tbody><tr><td>Red</td><td>Apple</td></tr><tr><td>Yellow</td><td>Banana</td></tr><tr><td>Green</td><td>Grapes</td></tr><tr><td>Orange</td><td>Orange</td></tr></tbody></table></figure><p>In the solution we can use the feature of ckeditor so we can also add table as above. using table menu.<br>We can add solution as text + image / Video / Audi (Yet to come)</p>"
        }
    ]
}

...

Let’s Compare MTF with MCQ data

Compare MCQ body with MTF body

Expand
titleMCQ body vs MTF body

MCQ Body

MTF Body

Code Block
languagehtml
<div class='question-body' tabindex='-1'>
    <div class='mcq-title' tabindex='0'>
        <p>Which of the fruits is red in colour?</p>
    </div>
    <div data-choice-interaction='response1' class='mcq-vertical'></div>
</div>
Code Block
languagehtml
<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>

Compare MCQ interactions with MTF interactions

Expand
titleMCQ interactions vs MTF interactions

MCQ interaction

MTF interaction

Code Block
languagejson
{
    "response1": {
        "type": "choice",
        "options": [
            {
                "label": "<p>Apple</p>",
                "value": 0,
                "hint": ""
            },
            {
                "label": "<p>Banana</p>",
                "value": 1,
                "hint": ""
            },
            {
                "label": "<p>Grapes</p>",
                "value": 2,
                "hint": ""
            },
            {
                "label": "<p>Orange</p>",
                "value": 3,
                "hint": ""
            }
        ],
        "validation": {
            "required": "Yes"
        }
    }
}
Code Block
languagejson
{
    "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"
        }
    }
}

Compare MCQ responseDeclaration with MTF responseDeclaration

Expand
titleMCQ responseDeclaration vs MTF responseDeclaration

MCQ responseDeclaration

MTF responseDeclaration

Code Block
languagejson
{
    "response1": {
        "cardinality": "single",
        "type": "integer",
        "correctResponse": {
            "value": 0
        },
        "mapping": [
            {
                "value": 0,
                "score": 1
            }
        ]
    }
}
Code Block
//MMCQ
{
        "response1": {
            "cardinality": "multiple",
            "type": "integer",
            "correctResponse": {
                "value": [
                    0,
                    3
                ]
            },
            "mapping": [
                {
                    "value": 0,
                    "score": 0.5
                },
                {
                    "value": 3,
                    "score": 0.5
                }
            ]
        }
    }
Code Block
languagejson
{
        "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
                }
            ]
        }
    }

Compare MCQ outcomeDeclaration with MTF outcomeDeclaration

Expand
titleMCQ outcomeDeclaration vs MTF outcomeDeclaration

MCQ outcomeDeclaration

MTF outcomeDeclaration

Code Block
{
        "maxScore": {
            "cardinality": "multiple",
            "type": "integer",
            "defaultValue": 1
        },
        "hint": {
            "cardinality": "single",
            "type": "string",
            "defaultValue": "8498fef0-37db-4123-95bb-ac45fccf9665"
        }
    }
Code Block
{
        "maxScore": {
            "cardinality": "multiple",
            "type": "integer",
            "defaultValue": 1
        },
        "hint": {
            "cardinality": "single",
            "type": "string",
            "defaultValue": "098eacc6-07fd-45ba-9e3c-372042154cd3"
        }
    }

Compare MCQ editorState with MTF editorState

Expand
titleMCQ editorState vs MTF editorState

MCQ editorState

MTF editorState

Code Block
languagejson
{
        "options": [
            {
                "answer": true,
                "value": {
                    "body": "<p>Apple</p>",
                    "value": 0
                }
            },
            {
                "answer": false,
                "value": {
                    "body": "<p>Banana</p>",
                    "value": 1
                }
            },
            {
                "answer": false,
                "value": {
                    "body": "<p>Grapes</p>",
                    "value": 2
                }
            },
            {
                "answer": true,
                "value": {
                    "body": "<p>Strawberry</p>",
                    "value": 3
                }
            }
        ],
        "question": "<p>Which of the fruits is red in colour?</p>",
        "solutions": [
            {
                "id": "71efa845-2856-4a82-b493-101facfddd26",
                "type": "html",
                "value": "<p>Apple is red in colour</p>"
            }
        ]
    }
Code Block
Code Block
languagejson
{
    "options": {
        "left": [
            {
                "value": {
                    "body": "<p>Red</p>",
                    "value": 0
                }
            },
            {
                "value": {
                    "body": "<p>Yellow</p>",
                    "value": 1
                }
            },
            {
                "value": {
                    "body": "<p>Green</p>",
                    "value": 2
                }
            },
            {
                "value": {
                    "body": "<p>Orange</p>",
                    "value": 3
                }
            }
        ],
        "right": [
            {
                "value": {
                    "body": "<p>Apple</p>",
                    "value": 0
                }
            },
            {
                "value": {
                    "body": "<p>Banana</p>",
                    "value": 1
                }
            },
            {
                "value": {
                    "body": "<p>Grapes</p>",
                    "value": 2
                }
            },
            {
                "value": {
                    "body": "<p>Orange</p>",
                    "value": 3
                }
            }
        ]
    },
    "question": "<p>Match the colour with the fruits.</p>",
    "solutions": [
        {
            "id": "3fe0e600-9746-4673-81a9-3429af3fef41",
            "type": "html",
            "value": "<figure class=\"table\"><table><tbody><tr><td>Red</td><td>Apple</td></tr><tr><td>Yellow</td><td>Banana</td></tr><tr><td>Green</td><td>Grapes</td></tr><tr><td>Orange</td><td>Orange</td></tr></tbody></table></figure><p>In the solution we can use the feature of ckeditor so we can also add table as above. using table menu.<br>We can add solution as text + image / Video / Audi (Yet to come)</p>"
        }
    ]
}

...

Complete MTF Question Metadata Example:
Expand
titleMTF question metadata
Code Block
{
    "mimeType": "application/vnd.sunbird.question",
    "media": [],
    "editorState": {
        "options": {
            "left": [
                {
                    "value": {
                        "body": "<p>Red</p>",
                        "value": 0
                    }
                },
                {
                    "value": {
                        "body": "<p>Yellow</p>",
                        "value": 1
                    }
                },
                {
                    "value": {
                        "body": "<p>Green</p>",
                        "value": 2
                    }
                },
                {
                    "value": {
                        "body": "<p>Orange</p>",
                        "value": 3
                    }
                }
            ],
            "right": [
                {
                    "value": {
                        "body": "<p>Apple</p>",
                        "value": 0
                    }
                },
                {
                    "value": {
                        "body": "<p>Banana</p>",
                        "value": 1
                    }
                },
                {
                    "value": {
                        "body": "<p>Grapes</p>",
                        "value": 2
                    }
                },
                {
                    "value": {
                        "body": "<p>Orange</p>",
                        "value": 3
                    }
                }
            ]
        },
        "question": "<p>Match the colour with the fruits.</p>",
        "solutions": [
            {
                "id": "3fe0e600-9746-4673-81a9-3429af3fef41",
                "type": "html",
                "value": "<figure class=\"table\"><table><tbody><tr><td>Red</td><td>Apple</td></tr><tr><td>Yellow</td><td>Banana</td></tr><tr><td>Green</td><td>Grapes</td></tr><tr><td>Orange</td><td>Orange</td></tr></tbody></table></figure><p>In the solution we can use the feature of ckeditor so we can also add table as above. using table menu.<br>We can add solution as text + image / Video / Audi (Yet to come)</p>"
            }
        ]
    },
    "templateId": "mtf-horizontal",
    "complexityLevel": [],
    "maxScore": 1,
    "name": "MTF",
    "responseDeclaration": {
        "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
                }
            ]
        }
    },
    "outcomeDeclaration": {
        "maxScore": {
            "cardinality": "multiple",
            "type": "integer",
            "defaultValue": 1
        },
        "hint": {
            "cardinality": "single",
            "type": "string",
            "defaultValue": "098eacc6-07fd-45ba-9e3c-372042154cd3"
        }
    },
    "interactionTypes": [
        "match"
    ],
    "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"
            }
        }
    },
    "qType": "MTF",
    "primaryCategory": "Match The Following Question",
    "solutions": {
        "3fe0e600-9746-4673-81a9-3429af3fef41": "<figure class=\"table\"><table><tbody><tr><td>Red</td><td>Apple</td></tr><tr><td>Yellow</td><td>Banana</td></tr><tr><td>Green</td><td>Grapes</td></tr><tr><td>Orange</td><td>Orange</td></tr></tbody></table></figure><p>In the solution we can use the feature of ckeditor so we can also add table as above. using table menu.<br>We can add solution as text + image / Video / Audi (Yet to come)</p>"
    },
    "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>",
    "answer": "<div class='match-container'><div class='left-options'><div class='left-option'><p>Red</p></div><div class='left-option'><p>Yellow</p></div><div class='left-option'><p>Green</p></div><div class='left-option'><p>Orange</p></div></div><div class='right-options'><div class='right-option'><p>Apple</p></div><div class='right-option'><p>Banana</p></div><div class='right-option'><p>Grapes</p></div><div class='right-option'><p>Orange</p></div></div></div>",
    "createdBy": "5a587cc1-e018-4859-a0a8-e842650b9d64",
    "board": "CBSE",
    "medium": [
        "English"
    ],
    "gradeLevel": [
        "Class 4"
    ],
    "subject": [
        "Hindi"
    ],
    "author": "Test User",
    "channel": "01309282781705830427",
    "framework": "inquiry_k-12",
    "copyright": "NIT123",
    "audience": [
        "Student"
    ],
    "license": "CC BY 4.0"
}

...