return $this->content;
}
+ $glossaryid = $this->config->glossary;
+
+ if(! $glossary = get_record('glossary', 'id', $glossaryid) ){
+ // we can get here if the glossary has been deleted, so
+ // unconfigure the glossary from the block..
+ $this->config->glossary = 0;
+ $this->config->cache = '';
+ $this->instance_config_commit();
+
+ $this->content->text = get_string('notyetconfigured','block_glossary_random');
+ $this->content->footer = '';
+ return $this->content;
+ }
+
+
if (empty($this->config->cache)) {
$this->config->cache = '';
}
$this->content->text = $this->config->cache;
// place link to glossary in the footer if the glossary is visible
- $glossaryid = $this->config->glossary;
- $glossary=get_record('glossary', 'id', $glossaryid);
//Create a temp valid module structure (course,id)
$tempmod->course = $this->course->id;