tunapanda / h5p-standalone

Display H5P content without the need for an H5P server
MIT License
272 stars 117 forks source link

var stmt not valid? #90

Closed sloopint closed 3 years ago

sloopint commented 3 years ago

Hello, Capture d’écran 2021-06-21 à 11 38 34

Using H5PStandalone, I try to adapt Ben de Vries’ solution to send xAPI data to my LRS. (https://www.bendevries.com/2020/09/02/connecting-moodle-h5p-content-with-an-lrs.html) Unfortunately, it doesn’t work. I get a 400 Error (Bad request). I suspect event.data.statement.actor, event.data.statement.verb, event.data.statement.object and event.data.statement.result not to be supported. Indeed it does work when I replace var stmt in the previous file with a manual statement (that looks like var stmt = new ADL.XAPIStatement( 'mailto:steve.vergenz.ctr@adlnet.gov', 'http://adlnet.gov/expapi/verbs/launched', 'http://vwf.adlnet.gov/xapi/virtual_world_sandbox' );

{ "actor": { "objectType": "Agent", "mbox": "mailto:steve.vergenz.ctr@adlnet.gov" }, "verb": { "id": "http://adlnet.gov/expapi/verbs/launched" }, "object": { "objectType": "Activity", "id": "http://vwf.adlnet.gov/xapi/virtual_world_sandbox" }} ) Is there a way to send a more complete set of data using H5PStandalone? Thanks a lot for your help.

0xMurage commented 3 years ago

@sloopint I would suggest you create the issue on ADL xAPI wrapper repository if you are still encountering the issue.