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 82af2372df2..f353a4b5816 100644 --- a/course/format/formatlegacy.php +++ b/course/format/formatlegacy.php @@ -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; diff --git a/course/format/topics/lib.php b/course/format/topics/lib.php index f26cafda2dd..debe045691d 100644 --- a/course/format/topics/lib.php +++ b/course/format/topics/lib.php @@ -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; diff --git a/course/format/weeks/lib.php b/course/format/weeks/lib.php index a5c11539af3..40686d4d419 100644 --- a/course/format/weeks/lib.php +++ b/course/format/weeks/lib.php @@ -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;