Change moodle activity icon

Hi, I love the moodle plugin and the functionality it gives our LMS.

But as the default H5P activity icon is not very pretty compared to the content you can deliver with it, I'm wondering how I can change it.
I tried uploading a different icon.png file to the moodle/mod/hvp/pix folder, but it makes no difference.

Thanks in advance!

 

icc's picture

Moodle caches the image, so you'll have to clear the caches after changing the image. This can be done through site administration -> development -> purge all caches.

Hi, I guess I'm missing something, as it doesn't work for me.

I replaced the icon with the same 128x128 px icon.png file only with a different icon.
I purged the cache but the icon remained the same. Any ideas if I'm missing something?

Thanks!

icc's picture

Hm, I'm not quite sure what the issue could be then. Have you tried removing the SVG file in the same folder? I think that it's used in some contexts.

I would also try asking in the Moodle Forums as this isn't H5P specific.

Hi,

thanks for the hint, it was the SVG - as soon as I replaced that and cleared the cache it worked.
Thanks!

icc's picture

I'm glad to hear that you got it working, and thanks for sharing the solution!

Invaluable sharing, thank you!! 

Just updated the H5P moodle plugin and libraries and of course, my previously set icon is gone.

Probably should have used a 'Child-plugin'. I know how to do that in Wp, but have no idea how to handle this in moodle. 

Any help is much appreciated ! 

You can use custom icons in themes, so you don't need to replace the core H5P ones in the plugin.

In your Moodle theme, you need a pix folder in the theme root like below:

/pix_plugins/mod/hvp/icon.svg

Thanks for the awesome advice!
It's really difficult to find moodle help that isn't oudated sometimes, thanks very much!

How about having different icons for all the different h5p content types in Moodle? At the moment users only see that it's h5p, but not if it's a video, a quiz, etc. Would that be possible with Moodle?

tim's picture

Hi Bjoern, I don't think that's possible right now. Perhaps you could make a post in the feature requests forum a developer from the community can pick it up. 

Good point! I just posted it here: https://h5p.org/node/51918

tim's picture

I think that link's broken Bjoern :/

 

I think there was a space at the end of the link that might have screwed it up (I just copy and pasted the link without formatting it as a URL). I edited it and it should work now!