question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Activity id does not seem to be passed to xAPI events

See original GitHub issue

Hi there ! I’m using your lib to display multiple H5P activities in a single page. Each activity has an id set. I’m also using H5P.externalDispatcher to track on xAPI events. It works, every activity displayed sends events that are caught and forwarded by the dispatcher. But every event I receive looks like this (note the object.id field ) :

Screenshot 2021-04-25 at 21 06 22

I’ve tried multiple kinds of id, even an URI (which, by the way, is a xAPI requirement).

I don’t know what to do, I need this id to correctly handle the events. Do you have a solution, or a workaround ?

Edit : Here’s the iframe code for the first activity, the content-id field is set to undefined.

<iframe id="h5p-iframe-undefined" class="h5p-iframe h5p-initialized" scrolling="no" data-content-id="undefined" style="width: 100%; height: 205px; border: medium none; display: block;" src="about:blank" frameborder="0"></iframe>

Have a good day,

Emeric

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
mrik974commented, Apr 27, 2021

I haven’t found out what’s going on but what I’ve found out is the h5p event has an object.definition.extensions field that contains the id. I think it’s really more a matter of vendor lib then, so I won’t bother you with it. Also, the missing line in h5p-standalone.class.js was repaired in version 3.0.1 (I don’t know why npm didn’t install the latest version, as I’m working on a very recent project…) I’ll close the issue, sorry for bothering you 😃

0reactions
mrik974commented, Apr 27, 2021

Hi @kileha3 thank you for your answer, but I don’t think I have the same issue. The present commit shows an object called registration being modified, but I believe my matter is more about the activityId object. Also I am not trying to send the xAPI event through the H5P lib, I’m only trying to catch them. And finally the activityId in the file vendor/h5p/js/h5p.js seems to be stored within the global H5P variable, which doesn’t seem good in my use case where I have multiple activities displayed in the same screen. It showed me a lead to follow though, I’ll try to see where the event is generated in the H5P vendor lib.

Read more comments on GitHub >

github_iconTop Results From Across the Web

10 Best Practices for xAPI Statements - The Learning Guild
It's important to use the correct identifiers for the Verbs and Activity Types in statements. Not only should we check for typos and ......
Read more >
Deep Dive: Activity - xAPI
Activity objects are matched through the statements query resource by passing the 'id' property of the object as an “activity” parameter, this ...
Read more >
How to Collect Activity Info with xAPI and Storyline - Devlin Peck
This tutorial teaches you how to collect additional activity information using xAPI and Storyline. Specifically, we dive into the Object ...
Read more >
Glossary · xAPI SCORM Profile - adl
SCORM does not provide guidance on how to get data back out of an LMS ... Activity IDs are required to be IRIs...
Read more >
Implementing xAPI to Support Articulate Content
The Articulate course. The parent ID will always be its own ID. Verbs. XAPI provides verbs to describe user activity. Here's a list ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found