diff --git a/classes/form/import/sessions.php b/classes/form/import/sessions.php index a9c47bf..d35ed90 100644 --- a/classes/form/import/sessions.php +++ b/classes/form/import/sessions.php @@ -46,7 +46,6 @@ class sessions extends moodleform { * Define the form - called by parent constructor */ public function definition() { - global $CFG; $mform = $this->_form; $element = $mform->createElement('filepicker', 'importfile', get_string('importfile', 'mod_attendance')); diff --git a/tests/attendance_webservices_test.php b/tests/attendance_webservices_test.php index 3e7ed0b..b52cfba 100644 --- a/tests/attendance_webservices_test.php +++ b/tests/attendance_webservices_test.php @@ -54,8 +54,6 @@ class attendance_webservices_tests extends advanced_testcase { * Setup class. */ public function setUp() { - global $DB; - $this->category = $this->getDataGenerator()->create_category(); $this->course = $this->getDataGenerator()->create_course(array('category' => $this->category->id)); @@ -83,6 +81,9 @@ class attendance_webservices_tests extends advanced_testcase { $this->attendance->add_sessions($this->sessions); } + /** + * Create new attendance activity. + */ private function create_attendance() { global $DB; $att = $this->getDataGenerator()->create_module('attendance', array('course' => $this->course->id));