Status: Waiting for peer review
3.6, 3.7, 3.9
MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_39_STABLE
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) or choicing a Fa-icon.
- 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.
GOAL 1: 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).
- As a siteadministrator, I should be able to set the option "Allow overwritting module icons at the module edit view" at the dminstrator > Advanced features page.
When the site administrator check the option "allow overwritting module icons af the module edit view", users who have the capability "Upload module icons images at module edit view" and "Pick a fa-icon module icons images at module edit view".
The standard users with this capability are Managers and Teacher.
- As a teacher, I should be able to have an option in a Moodle Activity or Resource to upload my own icon image.
- As a teacher, I should be able to have an option in a Moodle activity or Resource to choice my fa-icon.
GOAL 2: To give developers the option to create a local plugin that gives site administrators the option to overwrite the mod icons without help.
This goal is set for institutions that might want to have MORE control over the images or fa-icons that could be used for Moodle activities and resources. In order to keep it a "small" project I want to keep this simple.
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.
Links to existing tracker issues, forum discussions, contrib plugins
- Siteadministrator function to open new functionality in the module view.
- Capability setting standard for manager / teacher role.
- Siteadminstrators have the option to change the capability settings to the "desire" of the organisation.
- An activity icon upload field in the module form that overwrites the standard Icon when the teacher uploads a PNG/JPG/GIF icon.
- An Fa icon picker in the module form that overwrites the standard icon when the teachers picks a fa-icon.
- 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.
(Or in better words.. to make it possible that developers can add extra capabilities and functionality to this new option, in a way that that organisations/institutions can decided on fa-icons/image icons or other upload options as they desire)
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
- has been marked as being related by
MDL-45105 Predefine LTI icons in external tool configuration
- Development in progress
- is duplicated by
MDL-70858 Add possibility to give a cutom icon to each activity or resource
- will help resolve
MDL-42213 Selectable custom icons for file and URL resources