From 6f19a2a98b527ec091cc4ea693c65adbc24e4180 Mon Sep 17 00:00:00 2001 From: David Mudrak Date: Fri, 11 Nov 2011 12:10:02 +0100 Subject: [PATCH] MDL-29108 Removing global variables where they are not needed Spotted by Sam during the review (17.1 and 17.3) --- grade/grading/form/lib.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/grade/grading/form/lib.php b/grade/grading/form/lib.php index 92c2c973e6f..f14d99d7b24 100644 --- a/grade/grading/form/lib.php +++ b/grade/grading/form/lib.php @@ -438,7 +438,7 @@ abstract class gradingform_controller { * @return gradingform_instance */ public function create_instance($raterid, $itemid = null) { - global $DB; + // first find if there is already an active instance for this itemid if ($itemid && $current = $this->get_current_instance($raterid, $itemid)) { return $this->get_instance($current->copy($raterid, $itemid)); @@ -523,7 +523,6 @@ abstract class gradingform_controller { * @return array */ public static function sql_search_where($token) { - global $DB; $subsql = array(); $params = array();