Hi all. I have a simple yet time-consuming task to achieve and I am sure that someone must have achieved something similar before, to save me reinventing the wheel.
I need to add a block to each and every course in our production Moodle (2.9). I have tried the 'trick' where you add a block to the front page and change its settings to be available throughout the site, but in my case each block needs a different instance configuration and this is not possible using this method, as each block gets the same instance config as the front page block.
In general terms, the script would run something along these lines: For each course, add block with id 'x' (I am not bothered where, apart from 'left', but if there's a way of promoting it to the top, wonderful). That's pretty much it! There may be some additional configuration required too, based on text already present in each course's 'id number' field, but that's it.
Has anyone written a script to achieve anything like this already? Given time I could do it, but with the start of the new term fast approaching and two thirds of my team missing, time is not on my side.
Any help appreciated.