Select a content type by default

Hello,

I use H5P with Moodle and it's pretty interesting and useful in many courses. But I would like to push even more the integration with moodle selecting one content type by default in fonction of the page for exemple.
Is there method to do that or functions I could use or call in my local moodle code which permit to do that ?

Thanks.

icc's picture

This should be possible, but maybe not without changing a little bit of code. Ideally, you want to get a hold of the h5peditor instance variable. Alternatively, there could perhaps be some H5P.externalDispatcher events you could listen for in any .js file, like .on('editorload', e => console.log(e.data)).

Yeah, that is what I thought this needs to be changed in js code.
I will try to see more in details these events and do some debug in .js files.
Thanks.

Yeah, that is what I thought this needs to be changed in js code.
I will try to see more in details these events and do some debug in .js files.
Thanks.