gjb2048 / moodle-theme_essential

The Essential Moodle Theme
https://gjb2048.github.io/moodle-theme_essential/
GNU General Public License v3.0
91 stars 120 forks source link

Include hvp_alter_styles public function as part of theme #892

Closed mkpelletier closed 5 years ago

mkpelletier commented 5 years ago

Hi Gareth,

This one is an enhancement suggestion.

You may already be aware of this, but users cannot easily theme h5p content in a moodle site without making changes to the theme. The content and editor sit in an iframe, making it challenging to adjust the css as one would normally do.

H5P have included a guide with a small php function so that users can theme their h5p content. You can find this here: https://h5p.org/documentation/for-developers/visual-changes. As h5p content becomes more mature, it has become an indispensable part of some Moodle installations. Including the above function would go along way to simplifying the process of customisation.

What do you think? Should this be in the theme or in a local plugin?

gjb2048 commented 5 years ago

Hi Mathieu,

This H5P Support was added last November (2018) in version 3.5.1.2 -https://github.com/gjb2048/moodle-theme_essential/blob/V3.5.1.2/CHANGES.txt#L6 and will be in the M3.6 version.

Thus already done!

Gareth

mkpelletier commented 5 years ago

Gareth, sometimes you amaze me. I wish I would have seen this earlier. I would have saved myself a whole day of work!

Keep Well, Mathieu

gjb2048 commented 5 years ago

No worries Mathieu and have a good weekend :)

gjb2048 commented 5 years ago

FYI: https://github.com/gjb2048/moodle-theme_essential/blob/master/classes/mod_hvp_renderer.php

gjb2048 commented 5 years ago

https://github.com/gjb2048/moodle-theme_essential/blob/master/lib.php#L81 etc. you get the idea! :)

mkpelletier commented 5 years ago

Ha! Yeah, thanks. I had already added the function into my local fork. Fortunately, not all my time was wasted, though since I had to come up with my styles and that just needs to be pasted into the custom css box you have provided in the new version.

Thanks for the amazing work!