From e5598e30ea5084668dc15facddc7541d32c27550 Mon Sep 17 00:00:00 2001 From: Mark Nelson Date: Thu, 23 Aug 2018 20:37:32 +0800 Subject: [PATCH] #225 Renamed static function --- classes/element.php | 2 +- classes/element_helper.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/element.php b/classes/element.php index 134414f..00331a8 100644 --- a/classes/element.php +++ b/classes/element.php @@ -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; } diff --git a/classes/element_helper.php b/classes/element_helper.php index b9775bb..b5cb893 100644 --- a/classes/element_helper.php +++ b/classes/element_helper.php @@ -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); }