Experience Manager - WEKIT-ECS/MIRAGE-XR GitHub Wiki
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:
- It is subscribing to the events that are of interest for xAPI logging.
- It is generating xAPI statements based on the events.
- 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
xAPI Client Configuration
To configure the connection to a Learning Record Store, the following is required:
- The LRS endpoint for statements.
- An authorisation token for the intended store (with the needed roles).
- 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.