#225 Renamed static function

This commit is contained in:
Mark Nelson 2018-08-23 20:37:32 +08:00
parent f16434575d
commit e5598e30ea
2 changed files with 2 additions and 2 deletions

View file

@ -358,7 +358,7 @@ abstract class element {
* *
* @return bool returns true if the element can be added, false otherwise * @return bool returns true if the element can be added, false otherwise
*/ */
public static function allow_add() { public static function can_add() {
return true; return true;
} }

View file

@ -413,7 +413,7 @@ class element_helper {
// Ensure the necessary class exists. // Ensure the necessary class exists.
if (class_exists($classname)) { if (class_exists($classname)) {
// Additionally, check if the user is allowed to add the element at all. // Additionally, check if the user is allowed to add the element at all.
if ($classname::allow_add()) { if ($classname::can_add()) {
$component = "customcertelement_{$foldername}"; $component = "customcertelement_{$foldername}";
$options[$foldername] = get_string('pluginname', $component); $options[$foldername] = get_string('pluginname', $component);
} }