From: poltawski Date: Tue, 8 Jan 2008 16:47:19 +0000 (+0000) Subject: MDL-12464 - refine further so that glossary can't refer to instance from X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=2f2b289fe276d3eb7904a66dbfe775c9a9cf7c32;p=moodle.git MDL-12464 - refine further so that glossary can't refer to instance from another course (and cause breakage) --- diff --git a/blocks/glossary_random/block_glossary_random.php b/blocks/glossary_random/block_glossary_random.php index b14453761f..2b61d43e52 100644 --- a/blocks/glossary_random/block_glossary_random.php +++ b/blocks/glossary_random/block_glossary_random.php @@ -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;