-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: adds test for problem_check event with multiple questions
Expected fixture records the current behavior
- Loading branch information
1 parent
cf7fa19
commit 8361da5
Showing
2 changed files
with
200 additions
and
0 deletions.
There are no files selected for viewing
155 changes: 155 additions & 0 deletions
155
..._backends/processors/tests/fixtures/current/problem_check(server,multiple_questions).json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,155 @@ | ||
{ | ||
"name": "problem_check", | ||
"context": { | ||
"course_id": "course-v1:edX+DemoX+Demo_Course", | ||
"course_user_tags": { | ||
}, | ||
"user_id": 4, | ||
"path": "/courses/course-v1:edX+DemoX+Demo_Course/xblock/block-v1:edX+DemoX+Demo_Course+type@problem+block@a0effb954cca4759994f1ac9e9434bf4/handler/xmodule_handler/problem_check", | ||
"org_id": "edX", | ||
"enterprise_uuid": "", | ||
"module": { | ||
"display_name": "Multiple Choice Questions", | ||
"usage_key": "block-v1:edX+DemoX+Demo_Course+type@problem+block@a0effb954cca4759994f1ac9e9434bf4" | ||
}, | ||
"asides": { | ||
} | ||
}, | ||
"username": "e0d", | ||
"session": "97662bef7c463c187b8fd91e0f580468", | ||
"ip": "172.18.0.1", | ||
"agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36", | ||
"host": "local.overhang.io:8000", | ||
"referer": "http://local.overhang.io:8000/xblock/block-v1:edX+DemoX+Demo_Course+type@vertical+block@54bb9b142c6c4c22afc62bcb628f0e68?show_title=0&show_bookmark_button=0&recheck_access=1&view=student_view&format=Homework", | ||
"accept_language": "en-US,en;q=0.9", | ||
"event": { | ||
"state": { | ||
"seed": 1, | ||
"student_answers": { | ||
"a0effb954cca4759994f1ac9e9434bf4_3_1": "choice_2", | ||
"a0effb954cca4759994f1ac9e9434bf4_4_1": [ | ||
"choice_0", | ||
"choice_2" | ||
], | ||
"a0effb954cca4759994f1ac9e9434bf4_2_1": "blue" | ||
}, | ||
"has_saved_answers": false, | ||
"correct_map": { | ||
"a0effb954cca4759994f1ac9e9434bf4_2_1": { | ||
"correctness": "correct", | ||
"npoints": null, | ||
"msg": "", | ||
"hint": "", | ||
"hintmode": null, | ||
"queuestate": null, | ||
"answervariable": null | ||
}, | ||
"a0effb954cca4759994f1ac9e9434bf4_3_1": { | ||
"correctness": "correct", | ||
"npoints": null, | ||
"msg": "", | ||
"hint": "", | ||
"hintmode": null, | ||
"queuestate": null, | ||
"answervariable": null | ||
}, | ||
"a0effb954cca4759994f1ac9e9434bf4_4_1": { | ||
"correctness": "correct", | ||
"npoints": null, | ||
"msg": "", | ||
"hint": "", | ||
"hintmode": null, | ||
"queuestate": null, | ||
"answervariable": null | ||
} | ||
}, | ||
"input_state": { | ||
"a0effb954cca4759994f1ac9e9434bf4_2_1": { | ||
}, | ||
"a0effb954cca4759994f1ac9e9434bf4_3_1": { | ||
}, | ||
"a0effb954cca4759994f1ac9e9434bf4_4_1": { | ||
} | ||
}, | ||
"done": true | ||
}, | ||
"problem_id": "block-v1:edX+DemoX+Demo_Course+type@problem+block@a0effb954cca4759994f1ac9e9434bf4", | ||
"answers": { | ||
"a0effb954cca4759994f1ac9e9434bf4_4_1": [ | ||
"choice_0", | ||
"choice_2" | ||
], | ||
"a0effb954cca4759994f1ac9e9434bf4_3_1": "choice_2", | ||
"a0effb954cca4759994f1ac9e9434bf4_2_1": "yellow" | ||
}, | ||
"grade": 2, | ||
"max_grade": 3, | ||
"correct_map": { | ||
"a0effb954cca4759994f1ac9e9434bf4_2_1": { | ||
"correctness": "incorrect", | ||
"npoints": null, | ||
"msg": "", | ||
"hint": "", | ||
"hintmode": null, | ||
"queuestate": null, | ||
"answervariable": null | ||
}, | ||
"a0effb954cca4759994f1ac9e9434bf4_3_1": { | ||
"correctness": "correct", | ||
"npoints": null, | ||
"msg": "", | ||
"hint": "", | ||
"hintmode": null, | ||
"queuestate": null, | ||
"answervariable": null | ||
}, | ||
"a0effb954cca4759994f1ac9e9434bf4_4_1": { | ||
"correctness": "correct", | ||
"npoints": null, | ||
"msg": "", | ||
"hint": "", | ||
"hintmode": null, | ||
"queuestate": null, | ||
"answervariable": null | ||
} | ||
}, | ||
"success": "incorrect", | ||
"attempts": 9, | ||
"submission": { | ||
"a0effb954cca4759994f1ac9e9434bf4_4_1": { | ||
"question": "", | ||
"answer": [ | ||
"a piano", | ||
"a guitar" | ||
], | ||
"response_type": "choiceresponse", | ||
"input_type": "checkboxgroup", | ||
"correct": true, | ||
"variant": "", | ||
"group_label": "" | ||
}, | ||
"a0effb954cca4759994f1ac9e9434bf4_3_1": { | ||
"question": "", | ||
"answer": "a chair", | ||
"response_type": "multiplechoiceresponse", | ||
"input_type": "choicegroup", | ||
"correct": true, | ||
"variant": "", | ||
"group_label": "" | ||
}, | ||
"a0effb954cca4759994f1ac9e9434bf4_2_1": { | ||
"question": "", | ||
"answer": "yellow", | ||
"response_type": "optionresponse", | ||
"input_type": "optioninput", | ||
"correct": false, | ||
"variant": "", | ||
"group_label": "" | ||
} | ||
} | ||
}, | ||
"time": "2022-07-19T15:29:01.188319+00:00", | ||
"event_type": "problem_check", | ||
"event_source": "server", | ||
"page": "x_module" | ||
} |
45 changes: 45 additions & 0 deletions
45
...nds/processors/xapi/tests/fixtures/expected/problem_check(server,multiple_questions).json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"id": "6d1f033b-3f70-458c-b53a-e6bb63cbaef9", | ||
"result": {"score": {"min": 0.0}, "success": false}, | ||
"version": "1.0.3", | ||
"actor": { | ||
"objectType": "Agent", | ||
"account": { | ||
"name": "32e08e30-f8ae-4ce2-94a8-c2bfe38a70cb", | ||
"homePage": "http://localhost:18000" | ||
} | ||
}, | ||
"verb": { | ||
"id": "https://w3id.org/xapi/acrossx/verbs/evaluated", | ||
"display": { | ||
"en": "evaluated" | ||
} | ||
}, | ||
"object": { | ||
"objectType": "Activity", | ||
"definition": { | ||
"type": "http://adlnet.gov/expapi/activities/cmi.interaction", | ||
"interactionType": "choice" | ||
} | ||
}, | ||
"context": { | ||
"contextActivities": { | ||
"parent": [ | ||
{ | ||
"id": "http://localhost:18000/course/course-v1:edX+DemoX+Demo_Course", | ||
"objectType": "Activity", | ||
"definition": { | ||
"name": { | ||
"en-US": "Demonstration Course" | ||
}, | ||
"type": "http://adlnet.gov/expapi/activities/course" | ||
} | ||
} | ||
] | ||
}, | ||
"extensions": { | ||
"https://w3id.org/xapi/openedx/extension/transformer-version": "[email protected]", | ||
"https://w3id.org/xapi/openedx/extensions/session-id": "97662bef7c463c187b8fd91e0f580468" | ||
} | ||
} | ||
} |