Forum Discussion
RESOURCE: Full Guide to xAPI and Storyline
Hi Fiona! What you're trying to do is definitely possible, but I have not worked with LearnUpon before. Here is the general approach to accomplishing your goal:
- Create the xapi-statement.js file just as described in the tutorials, then add the "Execute JavaScript" triggers in your course to generate the custom statements.
- Once you've published the xAPI package, connect the story.html file to the xapi-statement.js and xapiwrapper.min.js files, just as described in the tutorials.
- The actor information will likely be provided by the LMS via a query string when you launch the course from the LMS. This means that you will need to pull the the actor object from the query string using JavaScript to use it in your custom xAPI statements. (So you will need to modify the xapi-statement.js file accordingly).
- Make sure that the credentials for the conf object are pointing at the LRS that's built into your LMS. If these credentials are not exposed, then I'm not sure how you would send custom statements to their LRS.
You won't need to get user name or email variables from the Storyline course since they'll be provided via a query string by the LMS, but if you want to use any variables from Storyline in your xAPI statements, then you will need to define the player variable using GetPlayer(). This will make more sense once you get to the intermediate tutorials.
After you take a look at query strings and how to access objects from them, give me a shout if you still need a hand. Learning more about JavaScript and xAPI will only help when it comes to accomplishing something like this.
Finally, to answer your question about why I don't publish as an xAPI package -- I prefer to have full control over the xAPI statements that are generated from the course. You cannot modify the verbs used by the default Storyline xAPI functionality (for example, every time a user views a slide, they "experienced" it). This has implications when it comes to querying the data and viewing data streams from multiple tools.
If you aren't too concerned about querying and making the data interoperable with other tools, then it's perfectly fine to do what you're trying to do (and I've done it before myself, too). Perhaps this is a good tutorial to add in the future.
Best of luck!
Thanks so much Devlin, you are clearly the smartest person I know right now lol! So, do I leave the tincan.xml file as it is, and then the LMS will pull both somehow and integrate the custom statements with the default statements? Any idea how I'd let the LMS "know" that there is this extra xapi-statement.js to read and report on? I guess the idea is that the script will get launched when the story.html file plays, but how does the LMS "know" to look for stuff to report on if it's outside of the tincan.xml?