MDL-12464 - refine further so that glossary can't refer to instance from

another course (and cause breakage)
This commit is contained in:
poltawski
2008-01-08 16:47:19 +00:00
parent 003bbcc817
commit 2f2b289fe2
@@ -163,7 +163,7 @@ class block_glossary_random extends block_base {
$glossaryid = $this->config->glossary;
if(! $glossary = get_record('glossary', 'id', $glossaryid) ){
if(! $glossary = get_record('glossary', 'id', $glossaryid, 'course', $this->course->id) ){
// we can get here if the glossary has been deleted, so
// unconfigure the glossary from the block..
$this->config->glossary = 0;