Share media files between different courses

Share media files between different courses

by Stephan Robotta -
Number of replies: 3
Picture of Core developers Picture of Plugin developers
Hello folks,

as an admin I would like to upload an image file that can be used be any teacher that designs a course. Is there such a feature available? At the moment I found the media gallery in one course only. The use case is that the teachers use HTML snippets to have the same styling in their courses. The html snippet includes and image that is used as an icon.

A solution that I see is using inline images with base64 encoding. However this isn't that user friendly.
Are there any suggestions or hints on how to share image files between courses? Thanks in advance.

Cheers, Stephan
Average of ratings: -
In reply to Stephan Robotta

Re: Share media files between different courses

by Joost Elshoff -
Picture of Particularly helpful Moodlers Picture of Testers
Hi Stephan,

You could include these bits in a 'template course' that you'd use when creating new courses, or that teachers can import using the import feature. Since a teacher is only such at course level, there's no real context available to them to pull these files from, or link to them, I think.
Average of ratings: Useful (3)
In reply to Joost Elshoff

Re: Share media files between different courses

by Stephan Robotta -
Picture of Core developers Picture of Plugin developers
Hi Joost,

Thank you for pointing this out. However, that solution doesn't work for me.
My work went into this TinyMCE plugin https://github.com/srobotta/moodle-tiny_htmlblock where I am not in the course context only.

Thanks anyway, Stephan
In reply to Stephan Robotta

Re: Share media files between different courses

by Gregor McNish -
Picture of Particularly helpful Moodlers
For this particular use case, you may want to look at adding an images folder to your webserver, uploading the images there, and hardcoding that location into your html template-- then the teacher wouldn't need to link it themselves. If you maintain a custom theme, you could also put reused images there.

For a more general solution you could look at creating a https://docs.moodle.org/402/en/File_system_repository and putting any resources you want people to be able to access there.