#225 Renamed static function

This commit is contained in:
Mark Nelson 2018-08-23 20:37:32 +08:00
parent fcaf1fefd5
commit c8939ae526
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
*/
public static function allow_add() {
public static function can_add() {
return true;
}

View file

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