|
@ -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)); |
|
|