Merge branch 'MDL-44272-master' of git://github.com/ankitagarwal/moodle
[moodle.git] / course / tests / courselib_test.php
index bc7f069..18e7dea 100644 (file)
@@ -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);
     }