Skip to content
Snippets Groups Projects
Commit 88ec3b06 authored by Ryan Smith's avatar Ryan Smith
Browse files

fix: Adds success to truefalse quiz question statements.

parent a18acc3d
No related branches found
No related tags found
No related merge requests found
......@@ -51,6 +51,7 @@ function truefalse(array $config, \stdClass $event, \stdClass $questionattempt,
'result' => [
'response' => $questionattempt->responsesummary,
'completion' => $questionattempt->responsesummary !== null,
'success' => $questionattempt->rightanswer === $questionattempt->responsesummary,
],
'context' => [
'platform' => $config['source_name'],
......
......@@ -53,7 +53,8 @@
"questionusageid": 1,
"questionid": 1,
"questionsummary": "test_question",
"responsesummary": "True"
"responsesummary": "True",
"rightanswer": "True"
}
],
"question": [
......
......@@ -118,7 +118,8 @@
"timestamp": "2015-06-10T15:31:41+01:00",
"result": {
"response": "True",
"completion": true
"completion": true,
"success": true
},
"context": {
"platform": "Moodle",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment