diff --git a/classes/local/block_verify_certs/certificates/base.php b/classes/local/block_verify_certs/certificates/base.php index a09065a..4e250d3 100644 --- a/classes/local/block_verify_certs/certificates/base.php +++ b/classes/local/block_verify_certs/certificates/base.php @@ -20,6 +20,7 @@ use admin_settingpage; use admin_setting_configcheckbox; use lang_string; +use ReflectionClass; /** * Base class for certificates. @@ -60,7 +61,9 @@ public function get_fullname(): string { * @return string */ final public function get_shortname(): string { - return str_replace(__NAMESPACE__ . '\\', '', static::class); + $reflector = new ReflectionClass(static::class); + + return $reflector->getShortName(); } /**