Browse Source

Fix some coding guideine items.

MOODLE_36_STABLE
Dan Marsden 6 years ago
parent
commit
3c9d0489b9
  1. 1
      classes/form/import/sessions.php
  2. 5
      tests/attendance_webservices_test.php

1
classes/form/import/sessions.php

@ -46,7 +46,6 @@ class sessions extends moodleform {
* Define the form - called by parent constructor * Define the form - called by parent constructor
*/ */
public function definition() { public function definition() {
global $CFG;
$mform = $this->_form; $mform = $this->_form;
$element = $mform->createElement('filepicker', 'importfile', get_string('importfile', 'mod_attendance')); $element = $mform->createElement('filepicker', 'importfile', get_string('importfile', 'mod_attendance'));

5
tests/attendance_webservices_test.php

@ -54,8 +54,6 @@ class attendance_webservices_tests extends advanced_testcase {
* Setup class. * Setup class.
*/ */
public function setUp() { public function setUp() {
global $DB;
$this->category = $this->getDataGenerator()->create_category(); $this->category = $this->getDataGenerator()->create_category();
$this->course = $this->getDataGenerator()->create_course(array('category' => $this->category->id)); $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); $this->attendance->add_sessions($this->sessions);
} }
/**
* Create new attendance activity.
*/
private function create_attendance() { private function create_attendance() {
global $DB; global $DB;
$att = $this->getDataGenerator()->create_module('attendance', array('course' => $this->course->id)); $att = $this->getDataGenerator()->create_module('attendance', array('course' => $this->course->id));

Loading…
Cancel
Save