June 2017
Beginner to intermediate
368 pages
8h 31m
English
There may well be an instance where another plugin (including other filters) has used an AJAX (JavaScript) callback to change text on the screen, but your filter still needs to know about it. In this scenario, we need to hook a JavaScript event. See the documentation at https://docs.moodle.org/dev/Filters#Dynamic_content for details. The first step to enabling this function is to create a new YUI module to listen out for changes. Create a new file called loader.js, nested inside a \yui\loader\ folder:

The YUI module that listens for a change event, and subsequently handles it (albeit it doesn't actually ...
Read now
Unlock full access