moodle-logstore_xapi
moodle-logstore_xapi copied to clipboard
\mod_scorm\event\sco_launched in failed log
Version
- 3.17.0
Steps to reproduce the bug
- Run the plugin with
\mod_scorm\event\sco_launched
events in the xapi log. - Observe the failed log.
Expected behaviour
- Event should be emitted and removed from the xapi log.
Actual behaviour
- Event is not emitted, it is removed from the xapi log, but it is added to the failed log.
Server information
- Postgres on Ubuntu 14.04 LTS
The objectid recorded in mdl_logstore_standard_log for sco_launched activities is the scoid.
This is incorrectly used here:
$scorm = $repo->read_record_by_id('scorm', $event->objectid);
This code throws an exception if the $event->objectid is not found.
Affected file: admin/tool/log/store/xapi/transformer/events/mod_scorm/sco_launched.php
Suggested solution:
$scormscoes = $DB->get_record('scorm_scoes', array('id' => $event->objectid), 'scorm');
$scorm = $repo->read_record_by_id('scorm', $scormscoes->scorm);
Thanks @mlynn-lp 👍 tagging @gordonmacqueen-lp
Fix merged in #686