moodle-logstore_xapi icon indicating copy to clipboard operation
moodle-logstore_xapi copied to clipboard

\mod_scorm\event\sco_launched in failed log

Open ryasmi opened this issue 6 years ago • 2 comments

Version

  • 3.17.0

Steps to reproduce the bug

  1. Run the plugin with \mod_scorm\event\sco_launched events in the xapi log.
  2. 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

ryasmi avatar Dec 06 '18 12:12 ryasmi

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);

mlynn-lp avatar Apr 15 '20 11:04 mlynn-lp

Thanks @mlynn-lp 👍 tagging @gordonmacqueen-lp

ryasmi avatar Apr 15 '20 13:04 ryasmi

Fix merged in #686

davidpesce avatar Sep 18 '23 12:09 davidpesce