Custom activity icons (MDL 3.9 / H5P)

Custom activity icons (MDL 3.9 / H5P)

by Bob Gilmore -
Number of replies: 1
Picture of Particularly helpful Moodlers

Hey folks,

Prefacing this with me not having the time to develop something like this myself....

With Moodle 3.9 and H5P integration (and, honestly, even with the previous plugin) I can see me using H5P for a lot of formative learning activities (Lessons, quizzes, etc).

It's quickly becoming apparent however that my courses are going to be a long string of blue H5P icons if I do this.

I can obviously just embed the H5P activities in a traditional Moodle activity, such as a lesson. Honestly, I prefer the Moodle lesson module over the H5P course presentation and will probably keep using this with embedded H5P. I'll only be forced to use the H5P activity if I need gradebook integration.

However, I was wondering how viable it would be to add to one of the themes the ability to customise activity icons on a per activity basis? Is this even a theme thing or something that another plugin should do? H5P itself provides unique icons for all of the libraries and Moodle displays them when creating a new content bank entry, so even if we could somehow pull the correct icon from there it would be great.

Anyone got any thoughts or comments (or even better, a working solution!)

Cheers!

Average of ratings: -
In reply to Bob Gilmore

Re: Custom activity icons (MDL 3.9 / H5P)

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
Possible in either the theme or by cloning the H5P activity and changing it. Entry point to thinking about the solution is the 'get_icon_url()' method in the 'cm_info' class.
Average of ratings: Useful (1)