THIS IS AN MUA PROJECT PROPOSAL THAT WILL BE OR HAS BEEN SUBMITTED FOR POSSIBLE MUA FUNDING. ANY EXISTING TRACKER ITEMS THAT THIS MIGHT DUPLICATE SHOULD BE LINKED TO BELOW.
Each activity / resource comes with an icon. These icons are set by Moodle HQ or a theme developer.
Site administrators and teachers have no options to overwrite these icons without creating a custom theme, or creating a "core" hack by adding a image folder to an existing theme. The latter is not desirable since this will be interfere with Moodle updates/upgrade processes.
I think it would be a great benefit to Moodle if site administrators and/or teachers have the option to overwrite the standard mod icons, so that it can be more adjusted to their organization or learning goals.
- Project size: small
- Audience: primary schools, universities, work places
- Target users: teachers, administrators/developers
- To give teachers the option to decided if they want to overwrite the standard activity / resource for their own icon by uploading an image (PNG/JPEG/GIF).
- To give developers the option to create a local plugin that gives site administrators the option to overwrite the mod icons without help.
User stories should be specific to each requirement and provide a clear view of what you want the improvement/new feature to accomplish.
As a teacher, I should be able to have an option in a Moodle Activity or Resource to upload my own icon.
As a developer, I would like to be able to create a local plugin that makes it possible to overwrite the Moodle Mod Icons created by Moodle and/or a theme developer.
1. An activity icon upload field in the module form that overwrites the standard Icon when the teacher uploads a PNG/JPG or GIF image.
2. Make it possible with hook(s) to implemented a local plugin that renders the activity icons, add extra CM info and get_array_of_activities so that a developer can created (by example) a local plugin that gives administrators the possibility to overwrite the activity/resources module icons.
We received this request from our end users. During our research we have tried several approaches.
The successfull approach so far are:
- placing a folder in the theme folder.
- Adding an image in the module description field and adding code to the course format that makes it possible to render the image in the description field in course view, so it can be used as a button. (https://moodleassociation.org/mod/forum/discuss.php?d=662#p2403 )
We got stuck in our research of adding an activity icon upload field to all Moodle activities and resource modules, due too missing hooks.
If a hook could be implemented in different places like mentioned below, we can created a Local plugin that gives site administrators the option to overwrite the activity / resources images without any involvement of a developer and meeting the request of his/ her organization to use icons that matched the organization needs.
A hook could be implemented in different places like:
- The activity icon render
- Add extra cm_info
- In get_array_of_activities