Skip to content

Experience Manager

Fridolin Wild edited this page Jan 13, 2023 · 16 revisions

The Experience Manager resides under Common/Scripts/ExperienceAPI and conceptually consists of the ExperienceService and the ExperienceAPI service. The latter has now moved to the i5 toolkit and has been significantly extended.

The ExperienceService is responsible for the following:

  1. It is subscribing to the events that are of interest for xAPI logging.
  2. It is generating xAPI statements based on the events.
  3. It is sending the generated statements to the xAPI server.

Calling the xAPI

The ExperienceAPI service is a wrapper for logging users' behavioural traces, communicating with an ExperienceAPIclient, encapsulating its complexity to make the sending of xAPI statements as easy as possible.

To drop a log statement to an xAPI learning record store (aka 'end point') the main functionality is:

Verb verb = new Verb("http://activitystrea.ms/schema/1.0/complete");
verb.displayLanguageDictionary.Add("en-us", "completed");
XApiObject obj = new XApiObject(mirageIRIroot + "/ActivityID=" + ActivityManager.Instance.Activity.id);
obj.AddName(ActivityManager.Instance.Activity.name);
Statement statement = GenerateStatement(verb, obj);
await xAPIClient.SendStatementAsync(statement);

The ExperienceService binds the ExperienceAPI service to the MirageXR applications, setting callbacks to the EventManager for all key system events (activity loaded, start activity, activate augmentation, start action step, finish action step, activity completed). Moreover, a measureCompleted event stores values from the measurement glyph - every time the user takes a measure.

xAPI Vocabulary Profile

Verb ID Verb Name Use in Objects
Primitives
http://id.tincanapi.com/verb/viewed viewed label, image, model
http://activitystrea.ms/schema/1.0/find found detect
http://activitystrea.ms/schema/1.0/listen listened_to audio, sound
http://activitystrea.ms/schema/1.0/watch watched video
Action glyphs
http://id.tincanapi.com/verb/focused focused_on act:Highlight, act:Point
http://activitystrea.ms/schema/1.0/open opened act:OpenBox
http://activitystrea.ms/schema/1.0/close closed act:CloseBox
https://wekit-community.org/verb/packed packed act:Pack
https://wekit-community.org/verb/unpacked unpacked act:Unpack
https://wekit-community.org/verb/picked picked act:Pick
https://wekit-community.org/verb/placed placed act:Place
https://wekit-community.org/verb/screwed screwed act:Screw
https://wekit-community.org/verb/unscrewed unscrewed act:Unscrew
https://wekit-community.org/verb/rotated rotated act:Rotate
https://wekit-community.org/verb/lowered lowered act:Lower
https://wekit-community.org/verb/located located act:Locate
https://wekit-community.org/verb/lubricated lubricated act:Lubricate
https://wekit-community.org/verb/painted painted act:Paint
https://wekit-community.org/verb/plugged plugged act:Plug
https://wekit-community.org/verb/unplugged unplugged act:Unplug
https://wekit-community.org/verb/unfastened unfastened act:Unfasten
https://w3id.org/xapi/dod-isd/verbs/measured measured act:Measure
Further predicates
https://wekit-community.org/verb/noticed noticed vfx (vfx:*)
https://wekit-community.org/verb/met met character (char:*)
Basic activity interaction
http://adlnet.gov/expapi/verbs/launched launched activity - started
http://adlnet.gov/expapi/verbs/initialized initialized activity - loaded
http://activitystrea.ms/schema/1.0/complete completed activity - completed
http://activitystrea.ms/schema/1.0/start started step - activated
http://activitystrea.ms/schema/1.0/experience experienced step - deactivated

xAPI Client Configuration

To configure the connection to a Learning Record Store, the following is required:

  1. The LRS endpoint for statements.
  2. An authorisation token for the intended store (with the needed roles).
  3. The xAPI version. (We use 1.0.3)

Currently the endpoint and version are configured here. The auth token can be inputed through the Unity Inspector in this file. To do it manually, change this line.