The longer version
TinCan.Statement
The events generated by JoinSession and CompleteSession are defined by how the module interacts with Apex, and require minimal customization. The information in the events sent by SendSessionEvent, on the other hand, are defined by what is happening inside the module itself and the construction of the data report needs to be much more open.
There is a short primer on xAPI in this documentation, which should provide some context for the rest of this section. If you want to dig deeper, there are much more comprehensive explanations out there you can find, including the official xAPI specification.
TinCan.Statement is a data structure compatible with the current xAPI standard.
Constructor
TinCanStatement only has a default constructor:
Relevant Members
Set manually
The following properties are available for you to set yourself. Verb and target(ie object) are required to create a valid xAPI statement, while result and context are available should you wish to use them.
Required
verb: The action the user took
target: The object of the action
Optional
result: Data relating to the result of the action taken
context: Data that helps describe the conditions surrounding the action, both in game and at a system level.
context.registration, context.platform, and context.revision are set automatically.
context.revision is set to equal the ApexSystem variable "ModuleVersion".
Set Automatically
You will see the following properties show up on the Apex report, but you should not set them yourself- they are always the same, and will be set for you by the SDK:
actor
: Set to the logged in user.timestamp
: records the time the event happened. Uses the headset system clock, and is set to UTC.version:
The version of of the xAPI spec being used. Currently 1.03.
Example Code
If you look at the TinCan API documentation you will find that there is a lot of possible data that you could include in a TinCan Statement, To help simplify things a little, you will find below some example code that includes the data that we feel is most relevant to the Apex System and should cover most of your needs. You are of course welcome to include any additional properties you would like in your report, and if you have any questions about how to do so, or about best practices feel free to contact us.
Example Data
This is the data that appears on Apex using the above code.
Last updated