I have a multi-tenanted moodle system (running v3.1) that has one set of code, but multiple databases - one for each client organisation. On log in we detect the URL and use the appropriate database to show the content for that client.
However, when we add features and functionality to the system, such as adding a block, it will be installed for ALL organisations as it goes into the blocks directory on the server. Logging in to any of the organisation URLs takes us to the upgrade page and we complete the installation as per normal.
What I want to do is find a way to install a block such that it is not visible by default and then turn it on for each organisation, rather than go through and turn it off one at a time. I don't mind the log in and upgrade the database step - that's all fine - I simply want to find a way to have the block hidden by default once it is installed, so as not to allow it to appear for all, only for those I turn it on for.
As I said - a bit left of field, but any ideas gratefully received!