Skip to content

Can't send xAPI statements from H5PStandalone #178

@sloopint

Description

@sloopint

Hello,
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.
Capture d’écran 2021-06-21 à 11 38 34

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions