MDL-42555 fix moodle_url typo in namespaces

This commit is contained in:
Petr Škoda 2013-10-27 10:22:44 +01:00 committed by Dan Poltawski
parent 90792eff8b
commit fc4365d0fe
7 changed files with 10 additions and 5 deletions

View File

@ -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));
}
/**

View File

@ -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));
}
/**

View File

@ -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));
}
/**

View File

@ -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));
}
/**

View File

@ -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));
}
/**

View File

@ -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',

View File

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