Logstore xAPI

Maintained by David Pesce
Logstore xAPI captures Moodle activity and sends it to a Learning Record Store (LRS) as xAPI (Tin Can) statements. Once configured, events like course views, quiz attempts, assignment submissions, and forum posts are automatically recorded in your LRS — no changes to your courses required.
Price option: Free

Supports Moodle 4.1-5.2 See all versions
Latest release: 4 days ago
Installations: 904
Downloads (last 90 days): 414

Frankenstyle name: logstore_xapi
Log storage

Comments

Comments are no longer open for new posts. Existing comments remain available to read.

Thank you very much Ryan Smith smile
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).
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
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.
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'])) {
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
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.
The last version of the plugin that will install, though with the error message described above, and that will not corrupt the Moodle database such that you have no access to your administration level, is version 1.4.0.
All versions of the plugin after this date do not work: so DONOT try to install them, in fact best would be for them to be taken down before they cause others a whole load of headaches.
I just tried to install it on Moodle 3.3, but it failed. Any thoughts?
Hi Paul, thanks for the your message, you might find it useful to check out this Github issue https://github.com/xAPI-vle/moodle-logstore_xapi/issues/128. I'm not sure if you're experiencing the same issue, but it certainly could be.
I just tried to install it on Moodle 3.3, but it failed. Any thoughts?
Hey Dasu, thanks for finding that issue and digging through to find the exact cause. Could you please create an issue in our Github issue tracker? That will ensure someone picks up the issue. https://github.com/xAPI-vle/moodle-logstore_xapi/issues
Hi Ryan,
Thanks for this reply. As David explained, after populated the records into ‘mdl_logstore_xapi_log", I executed the scheduled task . However there is an issue in new plugin version (2017061100). I can successfully send xapi statements into Learning Locker, but records didn’t delete from the ‘mdl_logstore_xapi_log’. I found this issue here in store.php
$xapiEvents = $xapiController->createEvents($translatorEventsBatch);
foreach(array_keys($xapiEvents) as $key) {
if (is_numeric($key)) {
$sentEvents[$xapiEvents[$key]['context']['extensions'][$translatorEventReadReturn[0]['context_ext_key']]['id']] = $xapiEvents['last_action_result'];
}
}
$xapiEvents variable get response like this,
Array(
[statements] => Array()
[response] => TinCan\LRSResponse Object(
[success] => 1
[content] => Array()
)
Therefore is_numeric doesn’t work as array keys are ‘statements’ and ‘response’. Further there is no attribute called 'last_action_result' here. Can you please explain this to me? Thanks for your time.
Dasu
Hi Dasu, thanks for your comment. It is possible although not natively supported in the plugin at the moment. David Kane contributed a script to do this a little while ago that you can use https://github.com/xAPI-vle/moodle-logstore_xapi/issues/42#issuecomment-252853343.