]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-15758 - fixing assignment & resource bugs
authormjollnir_ <mjollnir_>
Mon, 28 Jul 2008 10:44:25 +0000 (10:44 +0000)
committermjollnir_ <mjollnir_>
Mon, 28 Jul 2008 10:44:25 +0000 (10:44 +0000)
mod/assignment/lib.php
mod/resource/lib.php

index b65fba7af473cde259208108c07a9cf57b750166..c1dae2afb48103b2cd413afd7f8b7f47beab2edb 100644 (file)
@@ -3176,6 +3176,10 @@ class assignment_portfolio_caller extends portfolio_module_caller_base {
     }
 
     public function __wakeup() {
+        global $CFG;
+        if (empty($CFG)) {
+            return true; // too early yet
+        }
         require_once($this->assignmentfile);
         $this->assignment = unserialize(serialize($this->assignment));
     }
index ecaf5801c107bccb26ab48e7f72144d25aaf859e..b5e8c93851b309f3ae976c59fbf6eb636c753591 100644 (file)
@@ -718,6 +718,10 @@ class resource_portfolio_caller extends portfolio_module_caller_base {
     }
 
     public function __wakeup() {
+        global $CFG;
+        if (empty($CFG)) {
+            return; // too early yet
+        }
         require_once($this->resourcefile);
         $this->resource = unserialize(serialize($this->resource));
     }