MDL-29108 Removing global variables where they are not needed
authorDavid Mudrak <david@moodle.com>
Fri, 11 Nov 2011 11:10:02 +0000 (12:10 +0100)
committerDavid Mudrak <david@moodle.com>
Fri, 11 Nov 2011 11:10:02 +0000 (12:10 +0100)
Spotted by Sam during the review (17.1 and 17.3)

grade/grading/form/lib.php

index 92c2c97..f14d99d 100644 (file)
@@ -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();