I'm proposing a callback for overriding web service functions in MDL-63131 and I wanted to check if anyone else has opinions about it.
Please look at the tracker for details including the code (it's short and simple). Basically speaking, this proposal would allow a local plugin to override any existing web service function, for example to change the results or completely do something different.
The main reason for this is that we want to customise some parts of the mobile app behaviour without changing (a) core Moodle code, or (b) the app code. Changing a web service result would let us achieve some of this.
This also might give us a bit of operational flexibility, for example if there is some kind of security problem and we need to quickly hide results from a specific web service.
We wouldn't anticipate this callback being used in core code, and probably not even in published plugins (although I guess there might be some rare cases where that would be useful) - it would likely be done for particular custom installations only.
So anyway, please vote on MDL-63131 if you like the idea, or argue with me here if you think it's too evil to permit...