Is there a way where I could re define/declare the core modules of moodle like message_send() or email_to_user() functions without directly editing the core files.
Purpose is that, I would like to add some extra functionalities to happen along with the actual functionality when ever these functions are called. I could edit the core function, but, during upgrade, I might have to re-edit.
I could add custom function, but, this functions needs to be called where ever the message_send() or email_to_user() functions are called. We have them in many places this would again consume a lot of time and resource to identify the places and add this.
Any suggestion on how this can be achieved.
Thanks in advance