DarkW1nter
DarkW1nter

Reputation: 2851

Getting progress returned in xApi statements

I'm looking for some information on launched xApi packages.

If I launch a package from my own app and follow the course through to the end, in my LRS I can see statement detailing that I started, attempted, experienced and passed an activity, but nothing relating to the progress of the course / activity.

By this I mean the overall progress (as a percentage) visible to the user taking the course, so for each statement, whether it be 'experienced', 'attempted' or anything else, I'd like to return this percent complete.

** EDIT **

found this info, although unsure how and where to use it:

"If you want to track progress through the course, add these two actions at the title level: On Show - xAPI Statement - attempted - VAR(CurrentPageName) On Hide - xAPI Statement - completed - VAR(CurrentPageName)"

What I do notice is that the statements are recorded as follows: Damion Daly attempted Activity (No Name) Which leads me to think that I've not passed the activity correctly in the querystring, and therefore cannot get all info on that activity back, would that be correct?

If it's of any help I'm launching my package as below.

protected async void OpenIndexWithQryString1(object sender, EventArgs e) 
{ 
    string _course = await s.GetCourseTitle(); 
    string content = "[url to where our content is]" + _course + "/index.html"; 
    string endpoint = "[LRS endpoint]"; 
    string auth = "Basic (auth key)"; 
    string actor = "{\"objectType\":\"Agent\",\"name\":[\"user name\"],\"mbox\":[\"[email protected]\"]}"; 
    string registration = "(reg token)"; 
    string activity = "http://example.cpm/my-activity3/"; 
    string querystring = content + "?endpoint=" + endpoint + "&auth=" + auth + "&actor=" + actor + "&registration=" + registration + "&activity_id=" + activity; 
    bool b = ResponseHelper.Redirect(Uri.EscapeUriString(querystring), "_blank", "menubar=0,width=100,height=100"); 
}

Upvotes: 0

Views: 1007

Answers (1)

Brian J. Miller
Brian J. Miller

Reputation: 2274

This sounds like a content authoring tool specific issue and isn't core to xAPI. Recording progress through content can be done in any number of ways and doesn't generally depend on how that content is launched. Usually in xAPI a specific portion of a statement, or a statement in whole will record progress for an experience. For instance in cmi5 progress of an AU is recorded via an extension, see https://github.com/AICC/CMI-5_Spec_Current/blob/quartz/cmi5_spec.md#result_extensions_progress for more on it. (Note this content is not cmi5 based, so may intend to do things differently.)

As far as the "name" of an Activity, that will generally come from the Activity Definition and is not provided as part of the launch process that you are using. The LRS would need to receive that definition either as part of a statement or would need to be integrated with the launch system that is handling the package, probably via a tincan.xml based package which can include the definition elements inside of it. Note it may also be necessary to pass the canonical query string parameter when retrieving statements to get fully populated definitions where possible.

Upvotes: 0

Related Questions