Moodle plugins directory: Logstore xAPI | Moodle.org
Logstore xAPI
Log storage ::: logstore_xapi
Maintained by David Pesce
Logstore_xapi is a logstore plugin that emits xAPI statements to a Learning Record Store (LRS). Please post all questions, comments, and issues to Github (https://github.com/xAPI-vle/moodle-logstore_xapi).
Latest release:
822 sites
444 downloads
50 fans
Current versions available: 2
What does it do?
As stated on the Github repository, the plugin “emits events from the Moodle Logstore as xAPI statements.” For those that don’t know, the Moodle Logstore is a log of activities within 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 (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).
- The plugin passes the log entry from the logstore_standard_log to the Expander.
- The Expander expands the log entry with data from your Moodle database.
- The plugin passes the expanded event from step 2 to the Translator.
- The Translator translates the expanded event to xAPI/TinCan recipe options.
- The plugin passes the translated event from step 4 to the Emitter.
- The Emitter constructs the translated event as an xAPI/TinCan statement and emits it to the LRS.
Contributors
David Pesce (Lead maintainer): Developer
jerrett fowler: Developer
Ryan Smith: Developer
Please login to view contributors details and/or to contact them
I'm trying to install it on Moodle 3.3, but I am receving an error when validating (Validating logstore_xapi ... Error). Then the installation is cancelled. Is there something I'm doing wrong?
Thanks in advance,
Antonio.
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
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.
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
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'])) {