diff --git a/element/teachername/classes/element.php b/element/teachername/classes/element.php index c35d474..1c18e30 100644 --- a/element/teachername/classes/element.php +++ b/element/teachername/classes/element.php @@ -102,6 +102,11 @@ class element extends \mod_customcert\element { protected function get_list_of_teachers() { global $PAGE; + // Return early if we are in a site template. + if ($PAGE->context->id == \context_system::instance()->id) { + return []; + } + // The list of teachers to return. $teachers = array();