No matter how far away you are, your voices are never far from our ears. We recently improved our installation process because you asked us to and now by popular demand we’re announcing a Moodle plugin for the xAPI created with help from our partners the Charity Learning Consortium (CLC).

Let me take a minute to explain what it does, how it does it, and how you can get your hands on it.

What Does It Do?

As stated on the Github repository, the plugin simply “emits events from the Moodle Logstore as xAPI statements”. For those that don’t know, the Moodle Logstore is a log of activities in Moodle. When you view a course, complete a quiz, or grade a student a log of that activity is recorded in the Logstore. The plugin uses these logs to produce xAPI statements and then sends (emits) them to an LRS that you can configure.

How Does It Work?

The plugin is made up of three parts, an Expander, a Translator, and an Emitter. Every log entry goes through each of these parts in a six step process before finally reaching the LRS (see below).

  1. The plugin passes the log entry from the logstore_standard_log to the Expander
  2. The Expander expands the log entry with data from your Moodle database
  3. The plugin passes the expanded event from step 2 to the Translator
  4. The Translator translates the expanded event to xAPI recipe options
  5. The plugin passes the translated event from step 4 to the Emitter
  6. The Emitter constructs the translated event as an xAPI statement and emits it to the LRS
A simplified view of the six step process defined above

A simplified view of the six step process defined above

We hope that these parts will be reused to create similar plugins in the future, like a “Moodle to Activity Streams plugin” or a “Blackboard to xAPI plugin”.

How Do You Install It?

Assuming you’ve already got Moodle installed and working, you’ll want to follow the instructions below to install the plugin (you’ll need to be logged into Moodle as an Admin).

  1. Download the plugin
  2. Go to “http://www.example.com/admin/tool/installaddon/index.php” (replacing “www.example.com” with your own domain)
  3. Drag and drop your download from Step 1
  4. Click “Install plugin from the ZIP file”
  5. Click “Install plugin!”
  6. Click “Upgrade Moodle database now”
  7. Click “Continue”
  8. Set your “endpoint” to “http://demo.learninglocker.net/data/xAPI”
  9. Set your “username” to “d416e6220812740d3922eb09813ebb4163e8eb3e
  10. Set your “password” to “bc7e0a2edd5d1969b6d774e679d4eb4e7a35be13
  11. Click “Save changes
  12. Go to “http://www.example.com/admin/settings.php?section=managelogging” (replacing “www.example.com” with your own domain)
  13. Enable the “Logstore xAPI” plugin

Why Do You Need An LRS?

In steps 8, 9, and 10 you needed a Learning Record Store (LRS) to store the xAPI statements generated by the plugin. For the purpose of this tutorial, we at Learning Locker have created a free to use demo LRS. Let me pause here quickly, because some of you may be unfamiliar with the term “LRS” and “Statement”.

An LRS is a type of data repository designed to store learning activity statements. The xAPI specification states that “prior to the xAPI most LRSs were Learning Management Systems (LMSs)”, however “a full LMS is not necessary to implement the xAPI”, but the “xAPI is dependent on an LRS to function”.

A statement on the other hand is defined by the specification to be “A simple construct consisting of <actor (learner)> <verb> <object>, with <result>, in <context> to track an aspect of a learning experience”. The specification also states that “a set of several Statements may be used to track complete details about a learning experience”. In regards to Moodle, a set of several statements could detail how a learner progressed through a course.

Go Wild

Now that you’ve installed the plugin, you can start viewing courses on Moodle and you should see statements via the “Statements” page for the “Demo” LRS. You’ll need to login to the demo LRS with the email “[email protected]” and the password “demouser”.

We’d really like to know your thoughts, so if you’d like to share them, your voice will be heard in our chat, so head over there and be noisy.