I'm want to add a button in my module and users can call the custom function by clicking the button. How to connect onclick event with calling function.
Further more, is there anything like listener in Moodle? I want my function called automatically under specified conditions.
Thanks in advance.