Drupal Shortcodes - xAPI - Activity ID

Hi, this may have already been figured out in the new H5P release (which we aren't able to upgrade to yet), but just wanted to ask the question anyway.

Currently, using Drupal, we host our H5P on one subdomain (media.school.co.uk) and embed to display on another (course.school.co.uk). We also capture all xAPI statements generated, so, for example, completing a H5P might produce a statement in the LRS with the object ID 'http://course.school.co.uk/course1/node/6

Am I right in assuming that this would cause a problem when we want to embed more than one H5P on a page? As both activities would have the same object ID as their URL right?

I thought that, due to the release of Drupal shortcodes, there might be some way that this could be (or has been) accounted for? 

Thanks

falcon's picture

Hi!
They are supposed to use the H5Ps node id as the activity id, not the page they are being used from. Are you sure they're not using media.school.co.uk/node/15?

OK. So currently we don't use Drupal shortcodes - we just use the embed button. The xAPI statement definitely contains a reference to the course site it's embedded on though as the object ID:

"object": {

"objectType": "Activity", "id": "http://courses.school.co.uk/coursename/node/15", "definition": { "name": { "en-UK": "Unit 1 Homework Questions (Node Title)"

I might to look again at how we interpret the statements - but if the H5P activity natively picks up the activity ID as the source URL rather than the URL it's been embedded on then that's fine.

I guess it's also useful to include the URL of the page that the content has been embedded on too to provide context? This could be something worth cosnidering putting in the 'context' property of an xAPI statement? So:

"context": { "contextActivities": {
"category" : [
{"id: "http://courses.school.co.uk/coursename/node/15"}
]
} }, "object": { "objectType": "Activity", "id": "http://media.school.co.uk/node/6", "definition": { "name": { "en-UK": "Unit 1 Homework Questions" } } },

 

falcon's picture

Ok, I tried this locally by:

  1. Create content on my 127.0.0.1/seven site
  2. Embed that content on my 127.0.0.1/h5p site
  3. Printed out the xAPI statements from the embedded content

xAPI statement on the 127.0.0.1/h5p site used 127.0.0.1/seven in the id's. I'm unable to reproduce this problem :/

Adding the site it is embedded on as well in the xAPI statement could be interesting. The H5P team won't do this any time soon, but we would gladly accept a patch for it. It might be difficult to achieve in some browsers.

Thanks for checking. There must be something in the way we're interpreting the statements then - I'll ask our software developers. If we develop the ability to track URL the content is embedded on too then I'll happily submit a patch.