{ "specification": { "phases": [ { "label": "START", "options": [ { "OptionForParameters": { "stimulus": { "Textual": { "question": "Please enter a random number between 0 and 10." } }, "answer": { "NumberAnswer": { "parameter": "random1", "min": 0, "max": 10, "stepsize": 1 } }, "param": { "values": { } } } } ], "next": { "goto":"NUM2" } }, { "label": "NUM2", "options": [ { "OptionForParameters": { "stimulus": { "Textual": { "question": "And please enter another random number between 0 and 10?" } }, "answer": { "NumberAnswer": { "parameter": "random2", "min": 0, "max": 10, "stepsize": 1 } }, "param": { "values": { } } } } ], "next": { "goto":"askSum" } }, { "label": "askSum", "options": [ { "OptionForParameters": { "stimulus": { "Textual": { "question": "Ok, what is their sum, so what is [random1] + [random2] ?" } }, "answer": { "NumberAnswer": { "parameter": "sum", "min": 0, "max": 20, "stepsize": 1 } }, "param": { "values": { } } } } ], "updatefunction":{"EqualsFunction":[["random1","random2","sum"],["correctAnswer"]]}, "next": { "gotoif": [ { "label": "GOOD", "condition": { "values": { "correctAnswer": { "bool": true } } } }, { "label": "WRONG", "condition": { "values": { "correctAnswer": { "bool": false } } } } ] } }, { "label": "GOOD", "options": [ { "OptionForParameters": { "stimulus": { "Textual": { "question": "Yes, [random1] + [random2] = [sum]! Try again?" } }, "answer": { "BoolAnswer": { "parameter": "retry" } }, "param": { "values": { } } } } ], "next": { "gotoif": [ { "label": "END", "condition": { "values": { "retry": { "bool": false } } } }, { "label": "START", "condition": { "values": { "retry": { "bool": true } } } } ] } }, { "label": "WRONG", "options": [ { "OptionForParameters": { "stimulus": { "Textual": { "question": "No, [random1] + [random2] is not [sum]... Try again?" } }, "answer": { "BoolAnswer": { "parameter": "retry" } }, "param": { "values": { } } } } ], "next": { "gotoif": [ { "label": "END", "condition": { "values": { "retry": { "bool": false } } } }, { "label": "START", "condition": { "values": { "retry": { "bool": true } } } } ] } } ] }, "parameters": { "values": { "dialog.PhaseLabel": { "txt": "START" } } } }