From 2f2b289fe276d3eb7904a66dbfe775c9a9cf7c32 Mon Sep 17 00:00:00 2001 From: poltawski Date: Tue, 8 Jan 2008 16:47:19 +0000 Subject: [PATCH] MDL-12464 - refine further so that glossary can't refer to instance from another course (and cause breakage) --- blocks/glossary_random/block_glossary_random.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.39.5