mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-42555 fix moodle_url typo in namespaces
This commit is contained in:
parent
90792eff8b
commit
fc4365d0fe
@ -60,7 +60,7 @@ class course_completed extends base {
|
||||
* @return \moodle_url
|
||||
*/
|
||||
public function get_url() {
|
||||
return new moodle_url('/report/completion/index.php', array('course' => $this->courseid));
|
||||
return new \moodle_url('/report/completion/index.php', array('course' => $this->courseid));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -67,7 +67,7 @@ class course_completion_updated extends base {
|
||||
* @return \moodle_url
|
||||
*/
|
||||
public function get_url() {
|
||||
return new moodle_url('/course/completion.php', array('id' => $this->courseid));
|
||||
return new \moodle_url('/course/completion.php', array('id' => $this->courseid));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -60,7 +60,7 @@ class course_module_completion_updated extends base {
|
||||
* @return \moodle_url
|
||||
*/
|
||||
public function get_url() {
|
||||
return new moodle_url('/report/completion/index.php', array('course' => $this->courseid));
|
||||
return new \moodle_url('/report/completion/index.php', array('course' => $this->courseid));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -56,7 +56,7 @@ class role_assigned extends base {
|
||||
* @return \moodle_url
|
||||
*/
|
||||
public function get_url() {
|
||||
return new moodle_url('/admin/roles/assign.php', array('contextid' => $this->contextid, 'roleid' => $this->objectid));
|
||||
return new \moodle_url('/admin/roles/assign.php', array('contextid' => $this->contextid, 'roleid' => $this->objectid));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -56,7 +56,7 @@ class role_unassigned extends base {
|
||||
* @return \moodle_url
|
||||
*/
|
||||
public function get_url() {
|
||||
return new moodle_url('/admin/roles/assign.php', array('contextid' => $this->contextid, 'roleid' => $this->objectid));
|
||||
return new \moodle_url('/admin/roles/assign.php', array('contextid' => $this->contextid, 'roleid' => $this->objectid));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -507,6 +507,7 @@ class core_accesslib_testcase extends advanced_testcase {
|
||||
$this->assertEquals($raid, $event->other['id']);
|
||||
$this->assertSame('', $event->other['component']);
|
||||
$this->assertEquals(0, $event->other['itemid']);
|
||||
$this->assertInstanceOf('moodle_url', $event->get_url());
|
||||
$this->assertSame('role_assigned', $event::get_legacy_eventname());
|
||||
$roles = get_all_roles();
|
||||
$rolenames = role_fix_names($roles, $context, ROLENAME_ORIGINAL, true);
|
||||
@ -556,6 +557,7 @@ class core_accesslib_testcase extends advanced_testcase {
|
||||
$this->assertCount(3, $event->other);
|
||||
$this->assertSame('', $event->other['component']);
|
||||
$this->assertEquals(0, $event->other['itemid']);
|
||||
$this->assertInstanceOf('moodle_url', $event->get_url());
|
||||
$roles = get_all_roles();
|
||||
$rolenames = role_fix_names($roles, $context, ROLENAME_ORIGINAL, true);
|
||||
$expectedlegacylog = array($course->id, 'role', 'unassign',
|
||||
|
@ -803,6 +803,7 @@ class core_completionlib_testcase extends advanced_testcase {
|
||||
$this->assertEquals(context_module::instance($forum->id), $event->get_context());
|
||||
$this->assertEquals($USER->id, $event->userid);
|
||||
$this->assertEquals($this->user->id, $event->other['relateduserid']);
|
||||
$this->assertInstanceOf('moodle_url', $event->get_url());
|
||||
$this->assertEventLegacyData($current, $event);
|
||||
}
|
||||
|
||||
@ -830,6 +831,7 @@ class core_completionlib_testcase extends advanced_testcase {
|
||||
$this->assertEquals($USER->id, $event->userid);
|
||||
$this->assertEquals($this->user->id, $event->other['relateduserid']);
|
||||
$this->assertEquals(context_course::instance($this->course->id), $event->get_context());
|
||||
$this->assertInstanceOf('moodle_url', $event->get_url());
|
||||
$data = $ccompletion->get_record_data();
|
||||
$this->assertEventLegacyData($data, $event);
|
||||
}
|
||||
@ -857,6 +859,7 @@ class core_completionlib_testcase extends advanced_testcase {
|
||||
$this->assertInstanceOf('\core\event\course_completion_updated', $event);
|
||||
$this->assertEquals($this->course->id, $event->courseid);
|
||||
$this->assertEquals($coursecontext, $event->get_context());
|
||||
$this->assertInstanceOf('moodle_url', $event->get_url());
|
||||
$expectedlegacylog = array($this->course->id, 'course', 'completion updated', 'completion.php?id='.$this->course->id);
|
||||
$this->assertEventLegacyLogData($expectedlegacylog, $event);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user