...
and a private function to check if the functionality is enabled.
Code Block | ||
---|---|---|
| ||
/** * Is this plugin enabled * @return boolean true if enabled */ private function is_enabled() { $enabledplugins = \plugin_manager::get_plugin_type_enabled('plugin_' . $this->plugin_type); if (in_array($this->plugin, $enabledplugins)) { return true; } return false; } |
Scheduled Tasks
Scripts can be added to the cron directory in the plugin to be called by the system cron. The script should simply call the relevant action i.e for enrolment
...