mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 10:26:40 +02:00
MDL-39846 rename 'extra' event property to 'other'
This commit is contained in:
parent
605a8c336f
commit
c4297815eb
6 changed files with 41 additions and 41 deletions
8
lib/tests/fixtures/event_fixtures.php
vendored
8
lib/tests/fixtures/event_fixtures.php
vendored
|
@ -45,7 +45,7 @@ class unittest_executed extends \core\event\base {
|
|||
}
|
||||
|
||||
public function get_url() {
|
||||
return new moodle_url('/somepath/somefile.php', array('id'=>$this->data['extra']['sample']));
|
||||
return new moodle_url('/somepath/somefile.php', array('id'=>$this->data['other']['sample']));
|
||||
}
|
||||
|
||||
public function get_legacy_eventname() {
|
||||
|
@ -53,11 +53,11 @@ class unittest_executed extends \core\event\base {
|
|||
}
|
||||
|
||||
public function get_legacy_eventdata() {
|
||||
return array($this->data['courseid'], $this->data['extra']['sample']);
|
||||
return array($this->data['courseid'], $this->data['other']['sample']);
|
||||
}
|
||||
|
||||
public function get_legacy_logdata() {
|
||||
return array($this->data['courseid'], 'core_unittest', 'view', 'unittest.php?id='.$this->data['extra']['sample']);
|
||||
return array($this->data['courseid'], 'core_unittest', 'view', 'unittest.php?id='.$this->data['other']['sample']);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -91,7 +91,7 @@ class unittest_observer {
|
|||
self::$event[] = $event;
|
||||
if ($event->nest) {
|
||||
self::$info[] = 'observe_all-nesting-'.$event->courseid;
|
||||
unittest_executed::create(array('courseid'=>3, 'context'=>\context_system::instance(), 'extra'=>array('sample'=>666, 'xx'=>666)))->trigger();
|
||||
unittest_executed::create(array('courseid'=>3, 'context'=>\context_system::instance(), 'other'=>array('sample'=>666, 'xx'=>666)))->trigger();
|
||||
} else {
|
||||
self::$info[] = 'observe_all-'.$event->courseid;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue