MDL-37976 fixed missing global
authorMarina Glancy <marina@moodle.com>
Tue, 12 Feb 2013 01:53:47 +0000 (12:53 +1100)
committerMarina Glancy <marina@moodle.com>
Tue, 12 Feb 2013 01:59:35 +0000 (12:59 +1100)
course/format/formatlegacy.php
course/format/topics/lib.php
course/format/weeks/lib.php

index 82af237..f353a4b 100644 (file)
@@ -336,6 +336,7 @@ class format_legacy extends format_base {
      * @return bool whether there were any changes to the options values
      */
     public function update_course_format_options($data, $oldcourse = null) {
+        global $DB;
         if ($oldcourse !== null) {
             $data = (array)$data;
             $oldcourse = (array)$oldcourse;
index f26cafd..debe045 100644 (file)
@@ -271,6 +271,7 @@ class format_topics extends format_base {
      * @return bool whether there were any changes to the options values
      */
     public function update_course_format_options($data, $oldcourse = null) {
+        global $DB;
         if ($oldcourse !== null) {
             $data = (array)$data;
             $oldcourse = (array)$oldcourse;
index a5c1153..40686d4 100644 (file)
@@ -276,6 +276,7 @@ class format_weeks extends format_base {
      * @return bool whether there were any changes to the options values
      */
     public function update_course_format_options($data, $oldcourse = null) {
+        global $DB;
         if ($oldcourse !== null) {
             $data = (array)$data;
             $oldcourse = (array)$oldcourse;