diff --git a/blocks/glossary_random/block_glossary_random.php b/blocks/glossary_random/block_glossary_random.php index db094c95fe5..0e0f4d89b81 100644 --- a/blocks/glossary_random/block_glossary_random.php +++ b/blocks/glossary_random/block_glossary_random.php @@ -148,7 +148,11 @@ class block_glossary_random extends block_base { if (empty($this->config->glossary)) { $this->content = new stdClass(); - $this->content->text = get_string('notyetconfigured','block_glossary_random'); + if ($this->user_can_edit()) { + $this->content->text = get_string('notyetconfigured','block_glossary_random'); + } else { + $this->content->text = ''; + } $this->content->footer = ''; return $this->content; } @@ -175,7 +179,11 @@ class block_glossary_random extends block_base { $this->instance_config_commit(); $this->content = new stdClass(); - $this->content->text = get_string('notyetconfigured','block_glossary_random'); + if ($this->user_can_edit()) { + $this->content->text = get_string('notyetconfigured','block_glossary_random'); + } else { + $this->content->text = ''; + } $this->content->footer = ''; return $this->content; }