Moodle notification dialogues are used in various places, though currently mostly for exception displays. The new activity chooser also uses them and this is the easiest place to test them.
Open a course page
Open your JS console
Turn editing on
Open the Activity chooser
Confirm that it works as expected
Edit /enrol/ajax.php
Add something which has no chance of being parsed by a json parser (e.g. echo "{];"; die
Navigate to Course administration -> Users -> Enrolled users
Moodle notification dialogues are used in various places, though currently mostly for exception displays. The new activity chooser also uses them and this is the easiest place to test them.
Open a course page
Open your JS console
Turn editing on
Open the Activity chooser
Confirm that it works as expected
Edit /enrol/ajax.php
Add something which has no chance of being parsed by a json parser (e.g. echo "{];"; die
Navigate to Course administration -> Users -> Enrolled users
Confirm that an error was shown in a dialogue
Confirm that no errors were thrown in the console