Hi,
I cannot find event until when modalform is closed by close button:
I tried CANCEL_BUTTON_PRESSED and FORM_CANCELLED, but FORM_CANCELLED works great with cancel button and FORM_CANCELLED not working?
i find similar problem https://moodle.org/mod/forum/discuss.php?d=424900