From abc3a22f424f376183254b8fc4d3d097880d798b Mon Sep 17 00:00:00 2001 From: Marina Glancy Date: Tue, 12 Feb 2013 12:53:47 +1100 Subject: [PATCH] MDL-37976 fixed missing global --- course/format/formatlegacy.php | 1 + course/format/topics/lib.php | 1 + course/format/weeks/lib.php | 1 + 3 files changed, 3 insertions(+) diff --git a/course/format/formatlegacy.php b/course/format/formatlegacy.php index 82af2372df2bd..f353a4b58161d 100644 --- a/course/format/formatlegacy.php +++ b/course/format/formatlegacy.php @@ -336,6 +336,7 @@ public function course_format_options($foreditform = false) { * @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; diff --git a/course/format/topics/lib.php b/course/format/topics/lib.php index f26cafda2dd5c..debe045691d70 100644 --- a/course/format/topics/lib.php +++ b/course/format/topics/lib.php @@ -271,6 +271,7 @@ public function course_format_options($foreditform = false) { * @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; diff --git a/course/format/weeks/lib.php b/course/format/weeks/lib.php index a5c11539af36d..40686d4d4196a 100644 --- a/course/format/weeks/lib.php +++ b/course/format/weeks/lib.php @@ -276,6 +276,7 @@ public function course_format_options($foreditform = false) { * @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;