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