Hi,
what I'm looking for here is more of a general advice than a specific one.
I have a custom theme on my site which is based on Boost. I'm also currently developing a plugin, which performs some admin tasks (it's a tool_ kind of plugin) and saves some info about each course to the database.
I want to be able to display this info (just a couple of numbers) at each courses header for certain roles in Moodle.
So far so good. I can do it by modifying my own theme.
But what if I want to redistribute this plugin to someone else? This functionality is done by my tool_ plugin so shouldn't this plugin be responsible for modifying the 'current theme'(everyone can have different theme and I don't want to force them to use mine if they want to use my plugin) with its information?
I cannot find a way how to do this properly.
- I tried creating my own theme, which serves only these changes and make it as a parent theme to my current - this does not work, cause course_header() function is also defined in my theme, so parent theme is not called.
- Also, IMHO, tool_ plugins' renderer has no chance to alter course header.
- There no hooks for plugin functions to inject something to the header
Anyone can give a direction how to do this?