]> git.mjollnir.org Git - moodle.git/commitdiff
Use of get_html_head_contributions was causing unwanted interaction bewteen question...
authortjhunt <tjhunt>
Mon, 30 Jul 2007 17:04:46 +0000 (17:04 +0000)
committertjhunt <tjhunt>
Mon, 30 Jul 2007 17:04:46 +0000 (17:04 +0000)
question/type/questiontype.php

index 538af6b06827f1e5613b9ddd76befe4503391070..da40a84e357dfe2cfac02be073e47e3602df8bbe 100644 (file)
@@ -680,6 +680,8 @@ class default_questiontype {
         return false;
     }
 
+    // Used by the following function, so that it only returns results once per quiz page.
+    var $already_done = false;
     /**
      * If this question type requires extra CSS or JavaScript to function,
      * then this method will return an array of <link ...> tags that reference
@@ -700,14 +702,13 @@ class default_questiontype {
         // script.js or script.php that exist in the plugin folder.
         // Core question types should not use this mechanism. Their styles
         // should be included in the standard theme.
-        
+
         // We only do this once 
         // for this question type, no matter how often this method is called.
-        static $already_done = false;
-        if ($already_done) {
+        if ($this->already_done) {
             return array();
         }
-        $already_done = true;
+        $this->already_done = true;
         
         $plugindir = $this->plugin_dir();
         $baseurl = $this->plugin_baseurl();