adaptlearning / adapt-contrib-xapi

TinCan/xAPI extension for the Adapt Framework
GNU General Public License v3.0
12 stars 27 forks source link

sendStatement calls which includes attachment(s) is failing #117

Closed cahirodoherty-learningpool closed 1 year ago

cahirodoherty-learningpool commented 1 year ago

Subject of the issue

If the attachments parameter of a sendStatement call is populated, the request will fail Cause - sendStatement expects parameters as follows: statement, callback (optional), [attachment] (optional), so we cannot make use of the async version of this request, as including the third param (attachment) forces our inclusion of the second param (callback).

Your environment

Steps to reproduce

Create a course with xapi extension and a custom plugin that will add an 'attachments' array of objects to the xapi statement. Attachment objects should be of the form outlined here - https://www.npmjs.com/package/xapiwrapper/v/1.11.0#send-statement-with-attachments

Expected behaviour

Statement should be sent and no console errors appear

Actual behaviour

Statement is not sending. Console error declares function was expected where the attachment array was instead provided

github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version 1.1.3 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: