xapiapps includes a set of simple one-click activities. These include videos (eg: Youtube, Wistia), PDFs, slide decks, etc. These activities show the learner some content in a pop up dialog, and simply register that the learner has visited the content at all. A statement is sent when the learner closes the dialog (this also completes the activity).


Example of xAPI statement


xAPI Statement Structure

The general structure for a statement from this app looks like (words in bold discussed below):

{
    "id": ..., // generated statement id
    "timestamp": ..., // timestamp when the checklist was signed off
    "actor": ..., // LEARNER
    "context": {
        "registration": // REGISTRATION UUID        "contextActivities": {
            "other": ... // PATHWAY
        }    },
    "object": ..., // OBJECT
    "result": {
        "completion": true,
        "duration": "PT15.60356S" // DURATION
    },
    "verb": {
        "display": {
            "und": "completed"
        },
        "id": "http://adlnet.gov/expapi/verbs/completed"
    }
}

LEARNER

The learner of the assessment/checklist is the actor.

See Actor Element of xAPI Statements.


PATHWAY

The pathway the checklist/assessment was part of is included in context.

See Pathway xAPI Statements


REGISTRATION UUID

This is a valid uuid related to the particular task instance being completed. In practice you’ll only ever get one statement with this registration uuid.


OBJECT

The object looks like this:

{
  "definition": {
    "description": {
      "en-US": "Charlie bit my finger"
    },
    "name": {
      "en-US": "Charlie bit my finger"
    }
  },
  "id": "https://acme.xapiapps.com/xapi/def/embedly/498a3eaa-7ebd-2b03-d113-b8530b595719*ROOT",
  "objectType": "Activity"
}

The name and description are from the step in the pathway matching the activity. The id uniquely identifies the pathway+step.


DURATION

This is the duration from when the activity was started (dialog opened) until it was completed (dialog closed).

The duration is in an ISO 8601 format in accordance with xAPI specifications. See https://github.com/adlnet/xAPI-Spec/blob/master/xAPI-Data.md#45-iso-8601-timestamps