Is it possible to execute JS at end of a branching scenario?

Hi,

I have a question, is it possible to execute a JS at the end of a branch? What I am trying to do it is, when a certain branch is ended, I'd like to display and hide certain information on the website.

Thank you.

Content types: 
otacke's picture

Hi Iwan!

H5P offers several hooks for customization, among them one to add your own scripts (alter_scripts). There's an example on how this is done in WordPress on GitHub. There are similar examples for Moodle and Drupal as well.

You'd have to check if there's a proper event that you can listen to, e.g. xAPI statements that also contain some context information about what just happened in Branching Scenario.

Best,
Oliver

Hi Otacke! Thanks, I'm looking into the docs right now.