Logstore xAPI

Log storage ::: logstore_xapi
Maintained by Ryan Smith, jerrett fowler, David Pesce
Logstore_xapi is a logstore plugin which emits xAPI statements (also known as Tin Can) to an LRS of your choice. Please post all issues to Github (https://github.com/xAPI-vle/moodle-logstore_xapi).
Latest release:
455 sites
38 fans
Current versions available: 2


Until Moodle provides a way to automatically create new versions from Github releases we will no longer be publishing new versions here sorry, please track their progress on this via the JIRA MDLSITE-1865 Ticket.

What does it do?

As stated on the Github repository, the plugin simply “emits events from the Moodle Logstore as xAPI or TinCan 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/TinCan statements and then sends (emits) them to an LRS (Learning Record Store).

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/TinCan 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/TinCan statement and emits it to the LRS.

Potential privacy issues

This system sends logging information over the internet. This would include information about the user, links to their profile, and information of courses completed. It would be recommended to have a secure connection between your website and LRS if they are not within a private network.


Screenshot #0


Ryan Smith (Lead maintainer): Developer
jerrett fowler: Developer
David Pesce: Developer
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Paul
    Thu, Oct 12, 2017, 12:27 PM
    Dear all, I have just installed and tested 2.1.5 and that works for me on Moodle 3.3.2 The word of caution remains in that it would be highly inadvisable to install version 2 of the plugin on a Moodle 3.3.x system since it will "Müller" your system and require a fair degree of backend work to correct the problem.
  • Mon, Oct 16, 2017, 4:45 PM
    Thank you Ryan & Al for this great job
    But I add this remark to those who work behind a proxy server:
    If you are using the Tincanlaunch Mod and you are behind a proxy server, consider changing the proxy configuration in
    admin / tool / log / store / xapi / vendor / rusticisoftware / tincan / src / RemoteLRS.php
    by removing the automatic configuration:
    35 // protected $ proxy;
    Add :
    87 // this is here for some proxy handling
    88 'proxy' => '192.168.xxx.xxx:8080',
    and disable:
    / *
    106 if (isset ($ this-> proxy)) {
    107 $ http ['proxy'] = $ this-> proxy;
    * /
    In this way, xAPI will also work for Tincan content
  • Fri, Mar 23, 2018, 10:50 PM
    Just a heads up that in debugging mode we are getting a notice from your plugin of an undefined offset when using Moodles bulk upload via csv feature.

    Notice: Undefined offset: 0 in D:\WWP\wamp\www\NGT2\lms\admin\tool\log\store\xapi\classes\log\store.php on line 158

    Might changing line 157 of store.php to this line of code remove the notice while not causing any issues with your plugin?
    if (is_numeric($key) && isset($xapievents[$key]['context']['extensions'][Event::CONTEXT_EXT_KEY]['id'])) {
  • Mon, Mar 26, 2018, 9:10 PM
    Hi thanks Frank, I've made an issue for that on Github (https://github.com/xAPI-vle/moodle-logstore_xapi/issues/167). In future, please report any issues over there as the comments in here tend to get lost.
  • Tue, May 29, 2018, 4:08 PM
    Dear all,
    I'am trying to debug the source code of Logstore xAPI, in order to understand how this code works to be able to adapt it to my use case. For this, I wonder what is the entry point of this code? Thank you in advance for your reply
  • Wed, May 30, 2018, 4:59 PM
    Hi Mouaici, the entry point is classes/log/store.php#L113 (https://github.com/xAPI-vle/moodle-logstore_xapi/blob/master/classes/log/store.php#L113). In future, please post questions to Github where you'll get a faster response (https://github.com/xAPI-vle/moodle-logstore_xapi/issues).
  • Fri, Jun 8, 2018, 10:18 PM
    Thank you very much Ryan Smith smile
  • Fri, Jul 20, 2018, 1:57 PM
    Hi Ryan,
    VENDOR folder is empty in the new zip file. Is old folder unchanged?
  • Fri, Jul 20, 2018, 6:00 PM
    Hi Dey, my apologies been trying to fix the auto-release and accidentally released a local zip file without the vendor. Please try again.
  • Fri, Jul 20, 2018, 6:05 PM
    Thank you Ryan for this quick fix and for your great work.
  • Wed, Aug 8, 2018, 3:17 AM
    Hi Ryan,
    For some reason my plugin is not sending ANYTHING (as far as I can tell) to the Watershed LRS. My Activity Provider is correct because Tin Can Launch works with it. Can you please help me debug, or what could be the issue? Thank you.
  • Thu, Nov 14, 2019, 2:38 AM
    Hi Ryan and everyone,
    I am working behind institute proxy and trying to use this plugin in Moodle but no data is being transmitted to Learning Locker. I can see in the database that the table mdl_logstore_xapi_log is capturing events. I have also tried to send statements to Learning Locker directly which works. I followed the steps available in the website of h2tlabs. Please guide me.
  • Mon, Dec 9, 2019, 1:56 PM
    Hi everyone
    Have you planned to emit events for badges issuing?
  • Tue, Dec 10, 2019, 10:04 AM
    Hello Emmanuel - we have been maintaining the plugin via Github because Moodle doesn't allow automatic commits to the plugin site. We currently do not have badging events translating to xAPI statements, but we do have instructions on how to add new events. Feel free to submit it as a new issue and maybe even submit a PR if you feel comfortable. Thanks for your interest!
1 2 3 4
Please login to post comments