customize h5p on Moodle
Hi, I want to customize "branching scenario" plugin on Moodle. The only resource I found online is:
https://github.com/h5p/h5pmods-moodle-plugin
So I tried to test this example on my computer but I failed.
I download the whole folder and put it under my local theme folder. (I make sure the name is same as the defined name in config.php)
Then, I modify the public function hvp_alter_styles(&$styles, $libraries, $embedType) function in h5p/output/render.php as:
public function hvp_alter_styles(&$styles, $libraries, $embedType) {
global $CFG;
exit();
if ($embedType === 'editor') {
exit();
$styles[] = (object) array(
'path' => $CFG->httpswwwroot . '/theme/h5pmod/style/custom.css',
'version' => '?ver=0.0.1'
);
}
}
However, there is nothing changed and it seems that the function "hvp_alter_styles" has not been called. I also put some dummy echo statement in hvp_alter_styles function to test if it is called but nothing output.
Can anyone help me? I am so struggling.
Thanks