Additional capability checks are now in place to stop unauthorised
users from accessing the event monitor subscription page.
Thanks to Eloy Lafuente for creating a gist with ideas of tackling
No site level capability to the rule subscription.
When the rule plugin is not a module you can subscribe
to it without having to select to which module instance
you want to subscribe, so there is no need to display
a drop down menu.
The changes -
1) Ensure courses exist before we loop to avoid PHP warning.
2) Checked that the number of courses to display do not exceed the max setting.
3) Used format_string() instead of format_text().
4) Used the course context instead of system context.