Integrating two H5P libraries for a new question type

Nekerxd's picture
Forums: 

I'm working on a new H5P content type for interactive music activities. The goal is to allow learners to engage with song lyrics in a dynamic way, combining:

  • Interactive transcripts: Using H5P.Transcript made by Otacke to display synchronized lyrics that highlight in real-time as the song plays.

  • Fill-in-the-blank exercises: Integrating H5P.Blanks to create listening comprehension exercises where learners fill in missing words in the lyrics.

However, I'm facing two major issues:

  1. Missing buttons: The "Check" and "Show Solution" buttons are not appearing in my content.

  2. XAPI tracking not working: While the H5P.Blanks instance triggers XAPI events when users interact with the blanks, these events are not being recorded or stored by the H5P platform.

I'm looking for guidance on:

  • Best practices for integrating libraries.

  • Implementing XAPI tracking in a library that lacks native support.

  • Suggestions for alternative H5P libraries that might be easier to adapt for my purpose.

 

Any help or insights would be greatly appreciated!

Attachments: 
Content types: 
otacke's picture

Hi!

There's essentially only one way to use libraries as subcontent - using the newRunnable function.

Without any hint to your code, it's impossible to say why no buttons appear. Are they custom made? How? Are you using the H5P.Question library? In what way? ...

Your main instance will need to trigger xAPI statements and implement the getXAPIData function as defined in the question type contract (https://h5p.org/documentation/developers/contracts). H5PIntegrations will use the latter to fetch results. Other xAPI statements need to be picked up by a Learning Record Store.

Best,

Oliver