MDL-46509 enrol: Require 'enrol/PLUGIN:config' capabilities to show/hide enrollment instances

This commit is contained in:
Daniel Neis Araujo
2014-08-21 19:01:57 -03:00
committed by Daniel Neis Araujo
parent 0594336d92
commit b5a289c4e8
15 changed files with 176 additions and 22 deletions
+12 -1
View File
@@ -1554,13 +1554,24 @@ abstract class enrol_plugin {
/**
* Is it possible to delete enrol instance via standard UI?
*
* @param object $instance
* @param stdClass $instance
* @return bool
*/
public function can_delete_instance($instance) {
return false;
}
/**
* Is it possible to hide/show enrol instance via standard UI?
*
* @param stdClass $instance
* @return bool
*/
public function can_hide_show_instance($instance) {
debugging("The enrolment plugin '".$this->get_name()."' should override the function can_hide_show_instance().", DEBUG_DEVELOPER);
return true;
}
/**
* Returns link to manual enrol UI if exists.
* Does the access control tests automatically.