MDL-46509 enrol: Require 'enrol/PLUGIN:config' capabilities to show/hide enrollment instances
This commit is contained in:
committed by
Daniel Neis Araujo
parent
0594336d92
commit
b5a289c4e8
+12
-1
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user