Adding a Logic at the end of Quiz (Question Set) [Moodle]



I'm quite new in customizing the H5P. There is a case that I faced where I want to implement a simple logic implementation at the end of the quiz (question set). So, basically the interaction that needed to be implemented is placing an image when user has the full star, and different image if the user doesn't make the full correct answer. I look at the configuration of question, there is a configuration like this but it is only for video,

I checked the documentation and there is only moodle customization in github that updated 3 years ago, with very basic H5PMod implementation, so a bit confused in where to begin with. Is there any idea on how to begin? or is there a specific script file that I could modify in order to achieve this case? Thanks before

Content types: 
otacke's picture

Hi Marcel!

There's nothing wrong with using the basic modification plugin, even if it has not been updated in a while (

1) Use it to implement the alter_scripts hook to inject a script.

2) In that script, wait for the "completed" xAPI event sent out by H5P (

3) Modify the DOM as you like.