]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-12464 - refine further so that glossary can't refer to instance from
authorpoltawski <poltawski>
Tue, 8 Jan 2008 16:47:19 +0000 (16:47 +0000)
committerpoltawski <poltawski>
Tue, 8 Jan 2008 16:47:19 +0000 (16:47 +0000)
another course (and cause breakage)

blocks/glossary_random/block_glossary_random.php

index b14453761f8450602f5e62dca8b4e6a0b9110428..2b61d43e523b8427851a9a8879c2d9f9eca1678b 100644 (file)
@@ -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;