Search code examples
databaseh5p

Storing User Scores from Interactive Videos in a Database


I'm currently working on a project that involves creating interactive videos and storing user interactions, specifically scores, in a database.

My question is: Has anyone already found or developed a method to store user scores from an interactive video in a database? If so, could you please share your approach or point me to any resources that might be helpful?

Any insights or suggestions would be greatly appreciated. Thank you!

I've explored tools like H5P, ProProfs, and PopcornJS, but found limitations in controlling the score and storing it. I've also looked into other technologies like OneShot and WireWax.


Solution

  • For H5P:

    You will need to add your own piece of Javascript using H5P's alter_scripts hook. See the official documentation on customizing your platform.

    That script can listen to xAPI statements that H5P uses to send information to the H5P Integration (aka plugin). This is also documented in the official documentation. If you need to, you can learn more about xAPI in its specification.

    Your script can then send what it heard to the platform using common AJAX/XMLHttpRequest methods. You can then process all the information (way more than just scores) as needed on the server and store it inside a database the way you want to.