diff --git a/blocks/glossary_random/block_glossary_random.php b/blocks/glossary_random/block_glossary_random.php
index a3726118fc4..db96941d4fa 100644
--- a/blocks/glossary_random/block_glossary_random.php
+++ b/blocks/glossary_random/block_glossary_random.php
@@ -75,10 +75,10 @@ class block_glossary_random extends block_base {
' AND approved = 1 '.
'ORDER BY timemodified '.$SORT.' '.$LIMIT)) {
- if ($this->config->showconcept) {
- $text = "$entry->concept
";
- } else {
+ if (empty($this->config->showconcept)) {
$text = '';
+ } else {
+ $text = "$entry->concept
";
}
$text .= format_text($entry->definition, $entry->format);
@@ -168,15 +168,13 @@ class block_glossary_random extends block_base {
//Obtain the visible property from the instance
if (instance_is_visible('glossary', $tempmod)) {
-
$cm = get_coursemodule_from_instance('glossary',$glossaryid, $this->course->id) ;
if ($studentcanpost) {
-
- $this->content->footer = 'wwwroot.'/mod/glossary/edit.php?id='.$cm->id
.'" title="'.$this->config->addentry.'">'.$this->config->addentry.'
';
} else {
- $this->content->footer ='';
- }
+ $this->content->footer = '';
+ }
$this->content->footer .= ''.$this->config->viewglossary.'';