mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
Merge branch 'MDL-44272-master' of git://github.com/ankitagarwal/moodle
This commit is contained in:
commit
f1284d3cfe
@ -1950,7 +1950,7 @@ class core_course_courselib_testcase extends advanced_testcase {
|
||||
$this->assertEquals($cm->id, $event->objectid);
|
||||
$this->assertEquals($USER->id, $event->userid);
|
||||
$this->assertEquals('course_modules', $event->objecttable);
|
||||
$url = new moodle_url('/mod/assign/view.php', array('id' => $mod->id));
|
||||
$url = new moodle_url('/mod/assign/view.php', array('id' => $cm->id));
|
||||
$this->assertEquals($url, $event->get_url());
|
||||
|
||||
// Test legacy data.
|
||||
@ -1963,7 +1963,7 @@ class core_course_courselib_testcase extends advanced_testcase {
|
||||
$eventdata->userid = $USER->id;
|
||||
$this->assertEventLegacyData($eventdata, $event);
|
||||
|
||||
$arr = array($cm->course, "course", "add mod", "../mod/assign/view.php?id=$mod->id", "assign $cm->instance");
|
||||
$arr = array($cm->course, "course", "add mod", "../mod/assign/view.php?id=$cm->id", "assign $cm->instance");
|
||||
$this->assertEventLegacyLogData($arr, $event);
|
||||
$this->assertEventContextNotUsed($event);
|
||||
|
||||
@ -2056,7 +2056,7 @@ class core_course_courselib_testcase extends advanced_testcase {
|
||||
$this->assertEquals($cm->id, $event->objectid);
|
||||
$this->assertEquals($USER->id, $event->userid);
|
||||
$this->assertEquals('course_modules', $event->objecttable);
|
||||
$url = new moodle_url('/mod/forum/view.php', array('id' => $mod->id));
|
||||
$url = new moodle_url('/mod/forum/view.php', array('id' => $cm->id));
|
||||
$this->assertEquals($url, $event->get_url());
|
||||
|
||||
// Test legacy data.
|
||||
@ -2069,7 +2069,7 @@ class core_course_courselib_testcase extends advanced_testcase {
|
||||
$eventdata->userid = $USER->id;
|
||||
$this->assertEventLegacyData($eventdata, $event);
|
||||
|
||||
$arr = array($cm->course, "course", "update mod", "../mod/forum/view.php?id=$mod->id", "forum $cm->instance");
|
||||
$arr = array($cm->course, "course", "update mod", "../mod/forum/view.php?id=$cm->id", "forum $cm->instance");
|
||||
$this->assertEventLegacyLogData($arr, $event);
|
||||
$this->assertEventContextNotUsed($event);
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ class course_module_created extends base {
|
||||
* @return \moodle_url
|
||||
*/
|
||||
public function get_url() {
|
||||
return new \moodle_url('/mod/' . $this->other['modulename'] . '/view.php', array('id' => $this->other['instanceid']));
|
||||
return new \moodle_url('/mod/' . $this->other['modulename'] . '/view.php', array('id' => $this->objectid));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -111,7 +111,7 @@ class course_module_created extends base {
|
||||
*/
|
||||
protected function get_legacy_logdata() {
|
||||
return array ($this->courseid, "course", "add mod", "../mod/" . $this->other['modulename'] . "/view.php?id=" .
|
||||
$this->other['instanceid'], $this->other['modulename'] . " " . $this->other['instanceid']);
|
||||
$this->objectid, $this->other['modulename'] . " " . $this->other['instanceid']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -77,7 +77,7 @@ class course_module_updated extends base {
|
||||
* @return \moodle_url
|
||||
*/
|
||||
public function get_url() {
|
||||
return new \moodle_url('/mod/' . $this->other['modulename'] . '/view.php', array('id' => $this->other['instanceid']));
|
||||
return new \moodle_url('/mod/' . $this->other['modulename'] . '/view.php', array('id' => $this->objectid));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -111,7 +111,7 @@ class course_module_updated extends base {
|
||||
*/
|
||||
protected function get_legacy_logdata() {
|
||||
return array ($this->courseid, "course", "update mod", "../mod/" . $this->other['modulename'] . "/view.php?id=" .
|
||||
$this->other['instanceid'], $this->other['modulename'] . " " . $this->other['instanceid']);
|
||||
$this->objectid, $this->other['modulename'] . " " . $this->other['instanceid']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user