Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't send xAPI statements from H5PStandalone #178

Open
sloopint opened this issue Jun 21, 2021 · 0 comments
Open

Can't send xAPI statements from H5PStandalone #178

sloopint opened this issue Jun 21, 2021 · 0 comments

Comments

@sloopint
Copy link

sloopint commented Jun 21, 2021

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:[email protected]',
    'http://adlnet.gov/expapi/verbs/launched',
    'http://vwf.adlnet.gov/xapi/virtual_world_sandbox'
    );
   {
     "actor": {
                     "objectType": "Agent", "mbox": "mailto:[email protected]" },
     "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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant