mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
Merge branch 'MDL-59890-master' of git://github.com/andrewnicols/moodle
This commit is contained in:
commit
cd7cd9d9c1
66 changed files with 1410 additions and 123 deletions
|
@ -108,6 +108,10 @@ class core_calendar_action_event_test_event implements event_interface {
|
|||
return new event_description('asdf', 1);
|
||||
}
|
||||
|
||||
public function get_category() {
|
||||
return new \stdClass();
|
||||
}
|
||||
|
||||
public function get_course() {
|
||||
return new \stdClass();
|
||||
}
|
||||
|
|
96
calendar/tests/behat/category_events.feature
Normal file
96
calendar/tests/behat/category_events.feature
Normal file
|
@ -0,0 +1,96 @@
|
|||
@core @core_calendar
|
||||
Feature: Course Category Events
|
||||
In order to inform multiple courses of shared events
|
||||
As a manager
|
||||
I need to create catgory events
|
||||
|
||||
Background:
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| managera | Manager | A | managera@example.com |
|
||||
| managera1 | Manager | A1 | managera1@example.com |
|
||||
| managera2 | Manager | A2 | managera2@example.com |
|
||||
| teachera1i | Teacher | A1i | teachera1i@example.com |
|
||||
| managerb | Manager | B | managerb@example.com |
|
||||
| managerb1 | Manager | B1 | managerb1@example.com |
|
||||
| managerb2 | Manager | B2 | managerb2@example.com |
|
||||
| teacherb1i | Teacher | B1i | teacherb1i@example.com |
|
||||
| student1 | Student | 1 | student1@example.com |
|
||||
| student2 | Student | 2 | student2@example.com |
|
||||
And the following "categories" exist:
|
||||
| name | idnumber | category |
|
||||
| Year | year | |
|
||||
| Faculty A | faculty-a | year |
|
||||
| Faculty B | faculty-b | year |
|
||||
| Department A1 | department-a1 | faculty-a |
|
||||
| Department A2 | department-a2 | faculty-a |
|
||||
| Department B1 | department-b1 | faculty-b |
|
||||
| Department B2 | department-b2 | faculty-b |
|
||||
And the following "courses" exist:
|
||||
| fullname | shortname | idnumber | format | category |
|
||||
| Course A1i | A1i | A1i | topics | department-a1 |
|
||||
| Course A2i | A2i | A2i | topics | department-a2 |
|
||||
| Course B1i | B1i | B1i | topics | department-b1 |
|
||||
| Course B2i | B2i | B2i | topics | department-b2 |
|
||||
And the following "role assigns" exist:
|
||||
| user | role | contextlevel | reference |
|
||||
| managera | manager | Category | faculty-a |
|
||||
| managera1 | manager | Category | department-a1 |
|
||||
| managerb | manager | Category | faculty-b |
|
||||
| managerb1 | manager | Category | department-b1 |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| teachera1i | A1i | editingteacher |
|
||||
| teacherb1i | B1i | editingteacher |
|
||||
| student1 | A1i | student |
|
||||
| student1 | A2i | student |
|
||||
| student2 | B1i | student |
|
||||
| student2 | B2i | student |
|
||||
And the following "events" exist:
|
||||
| name | eventtype | category | course |
|
||||
| Site event | global | | |
|
||||
| FA event | category | faculty-a | |
|
||||
| DA1 event | category | department-a1 | |
|
||||
| DA2 event | category | department-a1 | |
|
||||
| FB event | category | faculty-b | |
|
||||
| DB1 event | category | department-b1 | |
|
||||
| DB2 event | category | department-b1 | |
|
||||
| CA1i event | course | | A1i |
|
||||
| CA2i event | course | | A2i |
|
||||
| CB1i event | course | | B1i |
|
||||
| CB2i event | course | | B2i |
|
||||
|
||||
@javascript
|
||||
Scenario: Manager of a Category can see all child and parent events in their category
|
||||
Given I log in as "managera"
|
||||
When I navigate to "Calendar" node in "Site pages"
|
||||
Then I should see "FA event"
|
||||
And I should see "DA1 event"
|
||||
And I should see "DA2 event"
|
||||
And I should not see "FB event"
|
||||
And I should not see "DB1 event"
|
||||
And I should not see "DB2 event"
|
||||
And I log out
|
||||
Given I log in as "managerb"
|
||||
When I navigate to "Calendar" node in "Site pages"
|
||||
Then I should see "FB event"
|
||||
And I should see "DB1 event"
|
||||
And I should see "DB2 event"
|
||||
And I should not see "FA event"
|
||||
And I should not see "DA1 event"
|
||||
And I should not see "DA2 event"
|
||||
|
||||
@javascript
|
||||
Scenario: Users enrolled in a course can see all child and parent events in their category
|
||||
Given I log in as "student1"
|
||||
When I navigate to "Calendar" node in "Site pages"
|
||||
Then I should see "FA event"
|
||||
And I should see "DA1 event"
|
||||
And I should see "DA2 event"
|
||||
And I should see "CA1i event"
|
||||
And I should see "CA2i event"
|
||||
And I should not see "FB event"
|
||||
And I should not see "DB1 event"
|
||||
And I should not see "DB2 event"
|
||||
And I should not see "CB1i event"
|
||||
And I should not see "CB2i event"
|
|
@ -240,6 +240,84 @@ class core_calendar_container_testcase extends advanced_testcase {
|
|||
$this->assertNull($event);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test that the event factory deals with invisible categorys as an admin.
|
||||
*/
|
||||
public function test_event_factory_when_category_visibility_is_toggled_as_admin() {
|
||||
// Create a hidden category.
|
||||
$category = $this->getDataGenerator()->create_category(['visible' => 0]);
|
||||
|
||||
$eventdata = [
|
||||
'categoryid' => $category->id,
|
||||
'eventtype' => 'category',
|
||||
];
|
||||
$legacyevent = $this->create_event($eventdata);
|
||||
|
||||
$dbrow = $this->get_dbrow_from_skeleton((object) $eventdata);
|
||||
$dbrow->id = $legacyevent->id;
|
||||
|
||||
$factory = \core_calendar\local\event\container::get_event_factory();
|
||||
$event = $factory->create_instance($dbrow);
|
||||
|
||||
// Module is still visible to admins even if the category is invisible.
|
||||
$this->assertInstanceOf(event_interface::class, $event);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test that the event factory deals with invisible categorys as an user.
|
||||
*/
|
||||
public function test_event_factory_when_category_visibility_is_toggled_as_user() {
|
||||
// Create a hidden category.
|
||||
$category = $this->getDataGenerator()->create_category(['visible' => 0]);
|
||||
|
||||
$eventdata = [
|
||||
'categoryid' => $category->id,
|
||||
'eventtype' => 'category',
|
||||
];
|
||||
$legacyevent = $this->create_event($eventdata);
|
||||
|
||||
$dbrow = $this->get_dbrow_from_skeleton((object) $eventdata);
|
||||
$dbrow->id = $legacyevent->id;
|
||||
|
||||
// Use a standard user.
|
||||
$user = $this->getDataGenerator()->create_user();
|
||||
|
||||
// Set the user to the student.
|
||||
$this->setUser($user);
|
||||
|
||||
$factory = \core_calendar\local\event\container::get_event_factory();
|
||||
$event = $factory->create_instance($dbrow);
|
||||
|
||||
// Module is invisible to non-privileged users.
|
||||
$this->assertNull($event);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test that the event factory deals with invisible categorys as an guest.
|
||||
*/
|
||||
public function test_event_factory_when_category_visibility_is_toggled_as_guest() {
|
||||
// Create a hidden category.
|
||||
$category = $this->getDataGenerator()->create_category(['visible' => 0]);
|
||||
|
||||
$eventdata = [
|
||||
'categoryid' => $category->id,
|
||||
'eventtype' => 'category',
|
||||
];
|
||||
$legacyevent = $this->create_event($eventdata);
|
||||
|
||||
$dbrow = $this->get_dbrow_from_skeleton((object) $eventdata);
|
||||
$dbrow->id = $legacyevent->id;
|
||||
|
||||
// Set the user to the student.
|
||||
$this->setGuestUser();
|
||||
|
||||
$factory = \core_calendar\local\event\container::get_event_factory();
|
||||
$event = $factory->create_instance($dbrow);
|
||||
|
||||
// Module is invisible to guests.
|
||||
$this->assertNull($event);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test that the event factory deals with completion related events properly.
|
||||
*/
|
||||
|
@ -264,6 +342,7 @@ class core_calendar_container_testcase extends advanced_testcase {
|
|||
$event->userid = 1;
|
||||
$event->modulename = 'assign';
|
||||
$event->instance = $assign->id;
|
||||
$event->categoryid = 0;
|
||||
$event->courseid = $course->id;
|
||||
$event->groupid = 0;
|
||||
$event->timestart = time();
|
||||
|
@ -312,6 +391,7 @@ class core_calendar_container_testcase extends advanced_testcase {
|
|||
$event->userid = $user->id;
|
||||
$event->modulename = 'lesson';
|
||||
$event->instance = $lesson->id;
|
||||
$event->categoryid = 0;
|
||||
$event->courseid = $course->id;
|
||||
$event->groupid = 0;
|
||||
$event->timestart = time();
|
||||
|
@ -397,6 +477,7 @@ class core_calendar_container_testcase extends advanced_testcase {
|
|||
'name' => 'Test event',
|
||||
'description' => 'Hello',
|
||||
'format' => 1,
|
||||
'categoryid' => 0,
|
||||
'courseid' => 1,
|
||||
'groupid' => 0,
|
||||
'userid' => 1,
|
||||
|
@ -418,6 +499,7 @@ class core_calendar_container_testcase extends advanced_testcase {
|
|||
'name' => 'Test event',
|
||||
'description' => 'Hello',
|
||||
'format' => 1,
|
||||
'categoryid' => 0,
|
||||
'courseid' => 1,
|
||||
'groupid' => 1,
|
||||
'userid' => 1,
|
||||
|
@ -459,4 +541,38 @@ class core_calendar_container_testcase extends advanced_testcase {
|
|||
$event = new calendar_event($record);
|
||||
return $event->create($record, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Pad out a basic DB row with basic information.
|
||||
*
|
||||
* @param \stdClass $skeleton the current skeleton
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function get_dbrow_from_skeleton($skeleton) {
|
||||
$dbrow = (object) [
|
||||
'name' => 'Name',
|
||||
'description' => 'Description',
|
||||
'format' => 1,
|
||||
'categoryid' => 0,
|
||||
'courseid' => 0,
|
||||
'groupid' => 0,
|
||||
'userid' => 0,
|
||||
'repeatid' => 0,
|
||||
'modulename' => '',
|
||||
'instance' => 0,
|
||||
'eventtype' => 'user',
|
||||
'timestart' => 1486396800,
|
||||
'timeduration' => 0,
|
||||
'timesort' => 1486396800,
|
||||
'visible' => 1,
|
||||
'timemodified' => 1485793098,
|
||||
'subscriptionid' => null
|
||||
];
|
||||
|
||||
foreach ((array) $skeleton as $key => $value) {
|
||||
$dbrow->$key = $value;
|
||||
}
|
||||
|
||||
return $dbrow;
|
||||
}
|
||||
}
|
||||
|
|
64
calendar/tests/coursecat_proxy_test.php
Normal file
64
calendar/tests/coursecat_proxy_test.php
Normal file
|
@ -0,0 +1,64 @@
|
|||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* coursecat_proxy tests.
|
||||
*
|
||||
* @package core_calendar
|
||||
* @copyright 2017 Andrew Nicols <andrew@nicols.co.uk>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
use core_calendar\local\event\proxies\coursecat_proxy;
|
||||
|
||||
/**
|
||||
* coursecat_proxy testcase.
|
||||
*
|
||||
* @copyright 2017 Andrew Nicols <andrew@nicols.co.uk>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class core_calendar_coursecat_proxy_testcase extends advanced_testcase {
|
||||
|
||||
public function test_valid_coursecat() {
|
||||
global $DB;
|
||||
$this->resetAfterTest();
|
||||
|
||||
$name = '2027-2028 Academic Year';
|
||||
$generator = $this->getDataGenerator();
|
||||
$category = $generator->create_category([
|
||||
'name' => $name,
|
||||
]);
|
||||
cache_helper::purge_by_event('changesincoursecat');
|
||||
|
||||
// Fetch the proxy.
|
||||
$startreads = $DB->perf_get_reads();
|
||||
$proxy = new coursecat_proxy($category->id);
|
||||
$this->assertInstanceOf(coursecat_proxy::class, $proxy);
|
||||
$this->assertEquals(0, $DB->perf_get_reads() - $startreads);
|
||||
|
||||
// Fetch the ID - this is known and doesn't require a cache read.
|
||||
$this->assertEquals($category->id, $proxy->get('id'));
|
||||
$this->assertEquals(0, $DB->perf_get_reads() - $startreads);
|
||||
|
||||
// Fetch the name - not known, and requires a read.
|
||||
$this->assertEquals($name, $proxy->get('name'));
|
||||
$this->assertEquals(1, $DB->perf_get_reads() - $startreads);
|
||||
|
||||
$this->assertInstanceOf('coursecat', $proxy->get_proxied_instance());
|
||||
}
|
||||
}
|
|
@ -114,6 +114,7 @@ class core_calendar_event_factory_testcase extends advanced_testcase {
|
|||
'name' => 'test',
|
||||
'description' => 'Test description',
|
||||
'format' => 2,
|
||||
'categoryid' => 0,
|
||||
'courseid' => 1,
|
||||
'groupid' => 1,
|
||||
'userid' => 1,
|
||||
|
@ -162,6 +163,7 @@ class core_calendar_event_factory_testcase extends advanced_testcase {
|
|||
'name' => 'test',
|
||||
'description' => 'Test description',
|
||||
'format' => 2,
|
||||
'categoryid' => 0,
|
||||
'courseid' => 1,
|
||||
'groupid' => 1,
|
||||
'userid' => 1,
|
||||
|
@ -210,6 +212,7 @@ class core_calendar_event_factory_testcase extends advanced_testcase {
|
|||
'name' => 'test',
|
||||
'description' => 'Test description',
|
||||
'format' => 2,
|
||||
'categoryid' => 0,
|
||||
'courseid' => 1,
|
||||
'groupid' => 1,
|
||||
'userid' => 1,
|
||||
|
@ -258,6 +261,7 @@ class core_calendar_event_factory_testcase extends advanced_testcase {
|
|||
'name' => 'test',
|
||||
'description' => 'Test description',
|
||||
'format' => 2,
|
||||
'categoryid' => 0,
|
||||
'courseid' => $course->id,
|
||||
'groupid' => 1,
|
||||
'userid' => 1,
|
||||
|
@ -312,6 +316,7 @@ class core_calendar_event_factory_testcase extends advanced_testcase {
|
|||
'name' => 'test',
|
||||
'description' => 'Test description',
|
||||
'format' => 2,
|
||||
'categoryid' => 0,
|
||||
'courseid' => 0,
|
||||
'groupid' => 1,
|
||||
'userid' => 1,
|
||||
|
@ -345,6 +350,7 @@ class core_calendar_event_factory_testcase extends advanced_testcase {
|
|||
'name' => 'Test event',
|
||||
'description' => 'Hello',
|
||||
'format' => 1,
|
||||
'categoryid' => 0,
|
||||
'courseid' => 1,
|
||||
'groupid' => 1,
|
||||
'userid' => 1,
|
||||
|
@ -378,6 +384,7 @@ class core_calendar_event_factory_testcase extends advanced_testcase {
|
|||
'name' => 'Test event',
|
||||
'description' => 'Hello',
|
||||
'format' => 1,
|
||||
'categoryid' => 0,
|
||||
'courseid' => 1,
|
||||
'groupid' => 1,
|
||||
'userid' => 1,
|
||||
|
@ -411,6 +418,7 @@ class core_calendar_event_factory_testcase extends advanced_testcase {
|
|||
'name' => 'Test event',
|
||||
'description' => 'Hello',
|
||||
'format' => 1,
|
||||
'categoryid' => 0,
|
||||
'courseid' => 1,
|
||||
'groupid' => 1,
|
||||
'userid' => 1,
|
||||
|
|
|
@ -202,6 +202,10 @@ class event_mapper_test_action_event implements action_event_interface {
|
|||
return $this->event->get_description();
|
||||
}
|
||||
|
||||
public function get_category() {
|
||||
return $this->event->get_category();
|
||||
}
|
||||
|
||||
public function get_course() {
|
||||
return $this->event->get_course();
|
||||
}
|
||||
|
@ -255,6 +259,11 @@ class event_mapper_test_action_event implements action_event_interface {
|
|||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class event_mapper_test_event implements event_interface {
|
||||
/**
|
||||
* @var proxy_interface $categoryproxy Category proxy.
|
||||
*/
|
||||
protected $categoryproxy;
|
||||
|
||||
/**
|
||||
* @var proxy_interface $courseproxy Course proxy.
|
||||
*/
|
||||
|
@ -312,6 +321,10 @@ class event_mapper_test_event implements event_interface {
|
|||
return new event_description('asdf', 1);
|
||||
}
|
||||
|
||||
public function get_category() {
|
||||
return $this->categoryproxy;
|
||||
}
|
||||
|
||||
public function get_course() {
|
||||
return $this->courseproxy;
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@ defined('MOODLE_INTERNAL') || die();
|
|||
|
||||
use core_calendar\local\event\entities\event;
|
||||
use core_calendar\local\event\proxies\std_proxy;
|
||||
use core_calendar\local\event\proxies\coursecat_proxy;
|
||||
use core_calendar\local\event\value_objects\event_description;
|
||||
use core_calendar\local\event\value_objects\event_times;
|
||||
use core_calendar\local\event\entities\event_collection_interface;
|
||||
|
@ -48,6 +49,7 @@ class core_calendar_event_testcase extends advanced_testcase {
|
|||
$constructorparams['id'],
|
||||
$constructorparams['name'],
|
||||
$constructorparams['description'],
|
||||
$constructorparams['category'],
|
||||
$constructorparams['course'],
|
||||
$constructorparams['group'],
|
||||
$constructorparams['user'],
|
||||
|
@ -82,6 +84,7 @@ class core_calendar_event_testcase extends advanced_testcase {
|
|||
'id' => 1,
|
||||
'name' => 'Test event 1',
|
||||
'description' => new event_description('asdf', 1),
|
||||
'category' => new coursecat_proxy(0),
|
||||
'course' => new std_proxy(1, $lamecallable),
|
||||
'group' => new std_proxy(1, $lamecallable),
|
||||
'user' => new std_proxy(1, $lamecallable),
|
||||
|
|
|
@ -1600,7 +1600,7 @@ class core_calendar_externallib_testcase extends externallib_advanced_testcase {
|
|||
public function test_submit_create_update_form_create_site_event() {
|
||||
$generator = $this->getDataGenerator();
|
||||
$user = $generator->create_user();
|
||||
$context = context_course::instance(SITEID);
|
||||
$context = context_system::instance();
|
||||
$roleid = $generator->create_role();
|
||||
$timestart = new DateTime();
|
||||
$interval = new DateInterval("P1D"); // One day.
|
||||
|
|
|
@ -32,6 +32,7 @@ use core_calendar\local\event\entities\action_event;
|
|||
use core_calendar\local\event\entities\event;
|
||||
use core_calendar\local\event\entities\repeat_event_collection;
|
||||
use core_calendar\local\event\proxies\std_proxy;
|
||||
use core_calendar\local\event\proxies\coursecat_proxy;
|
||||
use core_calendar\local\event\proxies\cm_info_proxy;
|
||||
use core_calendar\local\event\value_objects\action;
|
||||
use core_calendar\local\event\value_objects\event_description;
|
||||
|
@ -108,6 +109,7 @@ class action_event_test_factory implements event_factory_interface {
|
|||
$record->id,
|
||||
$record->name,
|
||||
new event_description($record->description, $record->format),
|
||||
new coursecat_proxy($record->categoryid),
|
||||
new std_proxy($record->courseid, function($id) {
|
||||
$course = new \stdClass();
|
||||
$course->id = $id;
|
||||
|
|
|
@ -277,4 +277,69 @@ class core_calendar_raw_event_retrieval_strategy_testcase extends advanced_testc
|
|||
$events = $retrievalstrategy->get_raw_events();
|
||||
$this->assertCount(3, $events);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test retrieval strategy with category specifications.
|
||||
*/
|
||||
public function test_get_raw_events_category() {
|
||||
global $DB;
|
||||
|
||||
$this->resetAfterTest();
|
||||
$retrievalstrategy = new raw_event_retrieval_strategy();
|
||||
$generator = $this->getDataGenerator();
|
||||
$category1 = $generator->create_category();
|
||||
$category2 = $generator->create_category();
|
||||
$events = [
|
||||
[
|
||||
'name' => 'E1',
|
||||
'eventtype' => 'category',
|
||||
'description' => '',
|
||||
'format' => 1,
|
||||
'categoryid' => $category1->id,
|
||||
'userid' => 2,
|
||||
'timestart' => time(),
|
||||
],
|
||||
[
|
||||
'name' => 'E2',
|
||||
'eventtype' => 'category',
|
||||
'description' => '',
|
||||
'format' => 1,
|
||||
'categoryid' => $category2->id,
|
||||
'userid' => 2,
|
||||
'timestart' => time() + 1,
|
||||
],
|
||||
];
|
||||
|
||||
foreach ($events as $event) {
|
||||
calendar_event::create($event, false);
|
||||
}
|
||||
|
||||
// Get all events.
|
||||
$events = $retrievalstrategy->get_raw_events(null, null, null, null);
|
||||
$this->assertCount(2, $events);
|
||||
|
||||
$event = array_shift($events);
|
||||
$this->assertEquals('E1', $event->name);
|
||||
$event = array_shift($events);
|
||||
$this->assertEquals('E2', $event->name);
|
||||
|
||||
// Get events for C1 events.
|
||||
$events = $retrievalstrategy->get_raw_events(null, null, null, [$category1->id]);
|
||||
$this->assertCount(1, $events);
|
||||
|
||||
$event = array_shift($events);
|
||||
$this->assertEquals('E1', $event->name);
|
||||
|
||||
// Get events for C2 events.
|
||||
$events = $retrievalstrategy->get_raw_events(null, null, null, [$category2->id]);
|
||||
$this->assertCount(1, $events);
|
||||
|
||||
$event = array_shift($events);
|
||||
$this->assertEquals('E2', $event->name);
|
||||
|
||||
// Get events for several categories.
|
||||
$events = $retrievalstrategy->get_raw_events(null, null, null, [$category1->id, $category2->id]);
|
||||
$this->assertCount(2, $events);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@ require_once($CFG->dirroot . '/calendar/lib.php');
|
|||
|
||||
use core_calendar\local\event\entities\event;
|
||||
use core_calendar\local\event\entities\repeat_event_collection;
|
||||
use core_calendar\local\event\proxies\coursecat_proxy;
|
||||
use core_calendar\local\event\proxies\std_proxy;
|
||||
use core_calendar\local\event\value_objects\event_description;
|
||||
use core_calendar\local\event\value_objects\event_times;
|
||||
|
@ -161,6 +162,7 @@ class core_calendar_repeat_event_collection_event_test_factory implements event_
|
|||
$dbrow->id,
|
||||
$dbrow->name,
|
||||
new event_description($dbrow->description, $dbrow->format),
|
||||
new coursecat_proxy($dbrow->categoryid),
|
||||
new std_proxy($dbrow->courseid, $identity),
|
||||
new std_proxy($dbrow->groupid, $identity),
|
||||
new std_proxy($dbrow->userid, $identity),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue