MDL-67945 enrol: missing $DB in edit_instance_form
authorAnthony Forth <a.j.forth@open.ac.uk>
Wed, 12 Feb 2020 12:26:16 +0000 (12:26 +0000)
committerFerran Recio <ferran@moodle.com>
Wed, 26 Feb 2020 15:22:36 +0000 (16:22 +0100)
enrol/self/lib.php

index 65b1440..f5beff8 100644 (file)
@@ -716,7 +716,7 @@ class enrol_self_plugin extends enrol_plugin {
      * @return bool
      */
     public function edit_instance_form($instance, MoodleQuickForm $mform, $context) {
-        global $CFG;
+        global $CFG, $DB;
 
         // Merge these two settings to one value for the single selection element.
         if ($instance->notifyall and $instance->expirynotify) {