Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sample xAPI Mapping #17

Draft
wants to merge 18 commits into
base: main
Choose a base branch
from
107 changes: 107 additions & 0 deletions docs/discovery/xapi-problem-check.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
{
"_comment": "This xAPI statement attempts to fully map all the data represented in the canonical sample event here https://edx.readthedocs.io/projects/devdata/en/latest/internal_data_formats/tracking_logs/sample_events.html",
"id": "8f87ccde-bb56-4c2e-ab83-44982ef22df0",
"actor": {
"objectType": "Agent",
"account": {
"homepage": "https://openedx.org/",
"name": "b5059046-d6db-11ec-8490-381428857bd9"
}
},
"verb": {
"_comment": "The tracking event type this sample corresponds to is 'problem_check'",
"id": "http://adlnet.gov/expapi/verbs/answered",
"display": {
"en-US": "answered"
}
},
"object": {
"objectType": "Activity",
"_comment": "This URL is a placeholder utilizing the 'usage_key'. Should be instance specific, but perhaps transferable across domains?",
"id": "https://openedx.org/block-v1:edX+DemoX+Demo_Course+type@problem+block@29c5cbd840324d94be8ba51db1864277",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're using a URL here, it might be useful to prefix /xblock/ to the path. That has the advantage of namespacing, as well as mapping to a real URL that renders the XBlock in question, e.g. https://demo.openedx.overhang.io/xblock/block-v1:edX+DemoX+Demo_Course+type@problem+block@303034da25524878a2e66fb57c91cf85

Screen Shot 2022-06-14 at 5 36 17 PM

"definition": {
"name": {
"en-US": "Which of the following is a fruit?"
},
"description": {
"en-US": "A diagnostic assessment related to fruit literacy."
},
"type": "http://adlnet.gov/expapi/activities/assessment",
"interactionType": "choice"
},
"_comment1": "The choicehint content feels most natural here in the activity definition rather than the response. It is packed into the user response in the current event format.",
"extensions": {
"https://openedx.org/xapi/choicehint": "<choicehint selected=\"true\">You are correct that an apple is a fruit because it is the fertilized ovary that comes from an apple tree and contains seeds.</choicehint>\n <choicehint selected=\"false\">Remember that an apple is also a fruit.</choicehint>\n"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that it is not a result information. Have you checked that no extensions already exists for this ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not see an extensions that seemed appropriate. I wonder if this data is just too unnatural to include in an xAPI statement.

@ormsbee do you have any specific recollection as to why this data was included in native Open edX events?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a recollection of it, but my guess would be because it matters for later analysis whether a student got the problem without hints, whether the hints helped them to get the correct answer, and which hint did so.

}
},
"result": {
"success": true,
"completion": true,
"_comment": "The response in Open edX events contains extra data about hints, what is the rationale for that, does it have a better home?",
"response": "apple",
"duration": "PT1M12S",
"score": {
"scaled": 1.0,
"raw": 1,
"min": 0,
"max": 1
},
"_comment1": "",
"extensions": {
"https://openedx.org/xapi/activity/attempts": 1,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The attempt-id extension seems appropriate for identifying a specific attempt. This field in the tracking logs represents the count of attempts that a user has made.

https://edx.readthedocs.io/projects/devdata/en/stable/internal_data_formats/tracking_logs.html#common-fields

"https://openedx.org/xapi/activity/seed": 1,
"https://openedx.org/xapi/result/correct_map": {
"29c5cbd840324d94be8ba51db1864277_2_1": {
"hint": "",
"hintmode": null,
"correctness": "incorrect",
"npoints": null,
"answervariable": null,
"msg": "<div class=\"feedback-hint-incorrect\"><div class=\"hint-label\">Incorrect: </div><div class=\"feedback-hint-multi\"><div class=\"hint-text\">You are correct that an apple is a fruit because it is the fertilized ovary that comes from an apple tree and contains seeds.</div><div class=\"hint-text\">Remember that a pumpkin is also a fruit.</div><div class=\"hint-text\">You are correct that a potato is a vegetable because it is an edible part of a plant in tuber form.</div><div class=\"hint-text\">Many people mistakenly think a tomato is a vegetable. However, because a tomato is the fertilized ovary of a tomato plant and contains seeds, it is a fruit.</div></div></div>",
"queuestate": null
}
}
}
},
"context": {
"registration": "123e4567-e89b-12d3-a456-426614174000",
"instructor": {
"objectType": "Agent",
"openid": "https://openedx.org/users/staff",
"name": "Staff User"
},
"team": {
"objectType": "Group",
"mbox": "mailto:[email protected]",
"name": "Open edX Staff"
},
"contextActivities": {
"parent": [
{
"id": "https://openedx.org/block-v1:edX+DemoX+Demo_Course"
}
]
},
"extensions": {
"http://id.tincanapi.com/extension/browser-info": {
"code_name": "Mozilla",
"name": "Netscape",
"version": "5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.152 Safari/537.36",
"platform": "MacIntel",
"user-agent-header": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.152 Safari/537.36",
"cookies-enabled": true
},
"http://id.tincanapi.com/extension/ip-address": "10.0.0.1",
"http://id.tincanapi.com/extension/referrer": "https://openedx.org/courses/course-v1:edX+DemoX+Demo_Course/courseware/d8a6192ade314473a78242dfeedfbf5b/330cf4d0c87b4bddbbd2eb4a466ff9f4/1?activate_block_id=block-v1%3AedX%2BDemoX%2BDemo_Course%2Btype%40vertical%2Bblock%40541e3597470c4c0d8ab11f6ac443fd5d",
"https://openedx.org/context/accept_language": "en;q=1.0, en;q=0.8",
"https://openedx.org/context/event_source": "server",
"https://openedx.org/context/asides": {},
"https://openedx.org/context/course_id": "course-v1:edX+DemoX+Demo_Course",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A best practice on xAPI is to use a parent in the contextActivities to describe from where the event was generated. Here this information is partially already contained in the parent. Some precision there is necessary. The use of extensions should be as minimal as possible

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose we must decide what is the appropriate parent for a specific question. Is it the course, sub-section, "assessment," something else?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ormsbee I'd love your thoughts on this. I'd also like to consider how this might change as ALUs are developed.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it has to be the assessment/sequence/subsection the problem is contained in. Per the spec:

For example: a Statement about a quiz question would have the quiz as its parent Activity.

In a more ALU-centric world, I think this still works–problems will almost always be invoked as part of some larger thing.

"https://openedx.org/context/path": "/courses/course-v1:edX+DemoX+Demo_Course/xblock/block-v1:edX+DemoX+Demo_Course+type@problem+block@29c5cbd840324d94be8ba51db1864277/handler/xmodule_handler/problem_check",
"https://openedx.org/context/org_id": "Open edx",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you suggesting using school or school-center instead of org? The extensions seems a bit of a hodge-podge at times. I'm not sure who AcrossX are and am not sure if there's a special meaning in the navy for "school-center."

I agree that we should use existing extensions where possible.

"https://openedx.org/context/course_user_tags": {}
}
},
"timestamp": "2022-05-18T16:00:00.633Z",
"version": "1.0.3"
}