A journey with JS

I have a love hate relationship with JavaScript.  It keeps creeping into my life. It makes me want to pull my hair.  It also gives me that elated feeling you get after solving a really tough problem.  And while I know how hard it was to make a link time out or send an e-mail on cue, often the response from end users is less than enthusiastic.  What’s so special about a time out link?

So why did I start this journey and what is so special about that e-mail?  Lets start about 3 years ago.

The journey of 1000 miles

While I was familiar with HTML and CSS, JS seemed a lot more complicated.  In my Distance Learning class, everyone dreaded the JS assignments.  We were just changing the inputs, but it seemed daunting.  I found a tool I really liked for the assignment so I could use it on my phone and iPad JS Anywhere.  I worked through some tutorials, but they always seemed to assume some prior knowledge.  After the class I didn’t really have any projects that needed it so I put it aside for a while.

Begins with 

Fast forward a couple of years, I signed up for my first xAPI cohort.  The statements are written in JSON a close cousin to JS.  A found a renewed desire to learn JS.  After the cohort, I bought books, I watched webinars, I tried code school.  Ultimately what worked was, of all things, the Khan Academy.  It started from the basics and worked up to more complex coding.  I still had trouble starting from scratch, but I could understand what was going on.  More importantly, I understood how to edit code.

The first step

My first project was for work.  I spent endless hours with a process that had too many steps.  I had to create a training with a link in articulate storyline, upload the file and then after 2 weeks, recreate the training with a new link, create a new training and upload that one.  Why couldn’t I just create 1 training where the link changed in 2 weeks?  The answer, I could, with JS!  I read blog posts, I looked a web sites I stole some code.  The major credit is probably to Matt Bibby, but Zsolt Olah may have given me some ideas as well.  Did it work?  Yes.  Oh, the time I have saved!  End user experience?  They don’t notice a difference.  But that is the point really.

Are you ready for the JS journey?

I have taken my journey and created a tutorial on how to complete your own articulate storyline js example.  I’ve used articulate rise to create the tutorial.  What are you waiting for?  Take the first step.

Time out link tutorial and example

How I learned more about xAPI

I think the first reference to xAPI that i remember, was about 2 years ago.  Then it was still referred to as TinCan API.  I googled and read a little about it at Rustici software’s blog site on TinCan API.   But that was as far as I got, I didn’t have a use case or a group of similarly interested people.   while the idea of tracking learning activities outside an LMS sounded interesting, I didn’t have the resources to do anything with it.

Fast forward a year.  New job, technology progresses.

My new boss was frustrated.  So many people in the company were creating content that was obviously learning; webinars, vimeo videos,  mobile gamified quizzes, even documents on sharepoint and all of these were outside the LMS.  How do you determine ROI for training when 1) you can’t track all of the learning that you support, and 2) you don’t have access to performance data?

I remembered that initial foray into xAPI.  That would solve the problem.  If only, I could pitch the idea and figure out how to implement it.  I started researching.

Rustici’s site was a great jumping off point, but I needed more.

I found http://learnxapi.com/ signed up and read and watched a number of great resources.

I considered an xAPI bootcamp, but as an added cost to Learning Solutions, it wasn’t in the budget.

Then I found the ADL site, the initiators of the xAPI specification. They had free xAPI cohorts to learn and create learning solutions using xAPI. But, they stopped offering the cohorts the previous year. Thank you Torrence learning who picked up where ADL left off. I signed up for the Spring 2016 xAPI Learning Cohort and really started to get my feet under me. Working with a team of similarly interested people I helped come up with a use case to set up as many xAPI enabled learning activities as possible and send the statements to our LRS (a free SCORM Cloud account).

At Learning Solutions I met Ben Betts and Craig Taylor who offer a free MOOC Learn xAPI using their own LRS, learning locker as a test site for sending and receiving statements.

Am I ready to conquer the world with xAPI? Not yet, but I’m on my way. My boss is a convert to the idea, we have started to spread the word about how this new technology will solve our business needs and we are brainstorming initial test cases.

Follow some of these links and see what you can learn!

xAPI code in action

This week I watched Increase the Value of Your eLearning with HTML5 and xAPI with James Kingsley from the e-Learning Brothers.

This was exactly the piece I felt like I was missing from understanding how xAPI statements GET made.  Most of the webinars, white papers and blogs I’ve ‘experienced’ have described the components of the xAPI code, but left out how to get the code to actually work.  James showed his end product, a web page created with bootstrap with 3 types of content each triggering a different type of xAPI statement.  Here’s what I learned:

  1. You must have a data call ‘trigger’ in the html anchor tag which ‘calls’ the xAPI statement you require.
  2. If you have something more complicated than a simple click>experience xAPI call, you will probably need to know some javascript or jQuery to make the xAPI statement trigger
  3. If you are having your actors sign on using oAuth access (pulling from existing google, facebook, twitter, etc accounts), you must have code to ask each account for the information you need.

Ultimately, if you are creating an xAPI enabled activity you will need 3 parts to enable your statements to be sent.  This is how it works.

xAPI in action

How to Collect Actor Information

In the previous post, I discussed the importance of Actor information in xAPI statements.  In this post I will describe how I have implemented this for the xAPI LearnPress Project.

Most companies have ways to set up SSO and security protocols for sites.  However, if you are creating a project on your own with little technical knowledge, this may be beyond your scope.  At this point in my project, it is beyond mine.  But there are tools to collect user information in WordPress.

Any Membership plug-in will probably work to collect this information.

Some plug-ins allowed the login gate to be set at the post rather than on your WordPress site. I decided to use WP-Members.  This offered 2 benefits.

  1. The dreaded pain of a login screen will not derail people from accessing my site, you will still be able to view my posts without having to remember ANOTHER password!
  2. It gives me ultimate control over which portions of the post get a login screen.
How I set it up:
  1. There is a nice quick set-up guide on the site for installation.
  2. Since I only wanted to use the login for my xAPI content, I changed the default post restriction, to not blocked.WP-membership1a
  3. When I create a post, I can choose to add the login with a simple check.WP-membership2
  4. Then I use wp-members login in tags to create the ‘blocked content’.  The user won’t see it until they login.WP-membership2b
  5. I chose to embed the H5P created content to be the only thing that was invisible until you login.WP-membership2a

If you would like to test the set-up, visit my initial H5P post; All Content Types are Not Created Equally



The Actors in xAPI

I have read many blog posts, heard a number of presentations and watched a number of YouTubes about how the code of xAPI works.

At it’s heart, it is simple.  An Actor, A Verb and An Object.
Bob Completed Drag and Drop Activity.

In practice, it is a little more complicated.

If you are doing the coding, there can be all sorts of extras that can be added to this simple statement.  This is a great thing, it will allow you to add all sorts of information that could be important to the learning activity.  Things like location (added to the Object), different types of security protocols for Actors, and Verbs translated into multiple languages or nuanced for different interactions.  To read more in highly technical speak that I’m still wading through read the ADL xAPI Spec

If you aren’t doing the coding things can still be tricky.  In my last post, I had H5P do the heavy lifting of coding the basic structure of the xAPI statement.  The Verb is coded into the content type as is the Object.  I didn’t need to make any changes.  But the Actor.  That was tricky.  The actor is coded into the statement, but it is a variable, and when an unknown user launches the activity, an error message appears and though data is sent, it is not connected to an actual user.

Anonymous users 729 and 490

anon 729 anon user 490

Actor names will be important.  If you are a provider of content or a learning professional, you want to track who is using your content and if they are making learning gains.  If you are working on your own professional development, you will want to track your personal learning back to a central e-mail or account.

For the xAPI LearnPress project, I have added a Membership Services Plug-in to create user accounts that will allow logging of individual Actors on posts that include content that send xAPI statements.  To see the result, revisit the Content types post.

I will add a how to in the next post…

All Content Types are not created equally

In my last post I created my first H5P content.  It was intended to send xAPI statements to the SCORM Cloud.  Alas, it did not…

So I went into trouble shooting mode.

  1. Was it the Settings on the LRS feed?   Cold
  2. Was it the Authentication settings for the Activity Provider in the LRS?  Cold
  3. Was it the fact I don’t have a sign-on for my WordPress?  Cold
  4. Was it a setting in H5P that I needed to set up?  Warmer
  5. Was it the type of activity I created?   Red Hot

In fact, some of the Content Types can send xAPI statements and some still sadly can’t.  For more check out this new H5P course presentation

xAPI requires an Actor to send statements.  This is YOU!  Please login…


The statements that have been collected from this activity in the LRS are more complex than SCORM allows.  And it also tracks time and interactions with the content.


H5P Content Plug-in


H5P Content Creation Plug-in (this link has a great tutorial on how to install the Plug-in).  The H5P Plug-in was created for the Norwegian education organization NDLA (National Digital Learning Arena) and allows you to create MANY different types of learning activities (see below for a few or visit their site).  You can upload them to an LMS (like Moodle or Canvas) or you can install the plug-in below to send your statements to an LRS.

content types h5p

To collect information on how learners are interacting with your activities, you also need to install the wp-h5p-xapi plug-in.  This will let you set up your WordPress to send xAPI statements that your learners generate by interacting with your activities.

Both of these options are open source and free.



xAPI MOOC with HT2

To help with my xAPI project, I realize I need more technical prowess.  Now I am at the technically dangerous stage.  I know enough to set up easy activities.  Things that don’t require me to change code much.  I also don’t have an LRS set up.

I met the HT2 team Ben Betts and Craig Taylor at the Learning Solutions 2016 meeting in Orlando.  Craig clued me into their MOOC offerings for xAPI.  Ben is a visionary in the xAPI community and  is the main driver on HT2’s Learning Locker.  HT2 Learning offers MOOCs on their Curatr social learning platform, as well as offering Learning Locker, one of a handful of open source LRS options.

May 12, 2016, they are starting a new MOOC about xAPI.  After registering and looking at the course, it seems a perfect fit.  There are 2 tracks, one an overview of what xAPI can do and a technical track.  I’m in!