@@ -102,8 +102,6 @@ public function test_course_searched() {
102102 // Checking that the event contains the expected values.
103103 $ this ->assertInstanceOf ('\mod_hsuforum\event\course_searched ' , $ event );
104104 $ this ->assertEquals ($ coursectx , $ event ->get_context ());
105- $ expected = array ($ course ->id , 'hsuforum ' , 'search ' , "search.php?id= {$ course ->id }&search= {$ searchterm }" , $ searchterm );
106- $ this ->assertEventLegacyLogData ($ expected , $ event );
107105 $ this ->assertEventContextNotUsed ($ event );
108106
109107 $ this ->assertNotEmpty ($ event ->get_name ());
@@ -181,8 +179,6 @@ public function test_discussion_created() {
181179 // Check that the event contains the expected values.
182180 $ this ->assertInstanceOf ('\mod_hsuforum\event\discussion_created ' , $ event );
183181 $ this ->assertEquals ($ context , $ event ->get_context ());
184- $ expected = array ($ course ->id , 'hsuforum ' , 'add discussion ' , "discuss.php?d= {$ discussion ->id }" , $ discussion ->id , $ forum ->cmid );
185- $ this ->assertEventLegacyLogData ($ expected , $ event );
186182 $ this ->assertEventContextNotUsed ($ event );
187183
188184 $ this ->assertNotEmpty ($ event ->get_name ());
@@ -336,8 +332,6 @@ public function test_discussion_deleted() {
336332 // Checking that the event contains the expected values.
337333 $ this ->assertInstanceOf ('\mod_hsuforum\event\discussion_deleted ' , $ event );
338334 $ this ->assertEquals ($ context , $ event ->get_context ());
339- $ expected = array ($ course ->id , 'hsuforum ' , 'delete discussion ' , "view.php?id= {$ forum ->cmid }" , $ forum ->id , $ forum ->cmid );
340- $ this ->assertEventLegacyLogData ($ expected , $ event );
341335 $ this ->assertEventContextNotUsed ($ event );
342336
343337 $ this ->assertNotEmpty ($ event ->get_name ());
@@ -445,9 +439,6 @@ public function test_discussion_moved() {
445439 // Checking that the event contains the expected values.
446440 $ this ->assertInstanceOf ('\mod_hsuforum\event\discussion_moved ' , $ event );
447441 $ this ->assertEquals ($ context , $ event ->get_context ());
448- $ expected = array ($ course ->id , 'hsuforum ' , 'move discussion ' , "discuss.php?d= {$ discussion ->id }" ,
449- $ discussion ->id , $ toforum ->cmid );
450- $ this ->assertEventLegacyLogData ($ expected , $ event );
451442 $ this ->assertEventContextNotUsed ($ event );
452443
453444 $ this ->assertNotEmpty ($ event ->get_name ());
@@ -514,9 +505,6 @@ public function test_discussion_viewed() {
514505 // Checking that the event contains the expected values.
515506 $ this ->assertInstanceOf ('\mod_hsuforum\event\discussion_viewed ' , $ event );
516507 $ this ->assertEquals ($ context , $ event ->get_context ());
517- $ expected = array ($ course ->id , 'hsuforum ' , 'view discussion ' , "discuss.php?d= {$ discussion ->id }" ,
518- $ discussion ->id , $ forum ->cmid );
519- $ this ->assertEventLegacyLogData ($ expected , $ event );
520508 $ this ->assertEventContextNotUsed ($ event );
521509
522510 $ this ->assertNotEmpty ($ event ->get_name ());
@@ -566,8 +554,6 @@ public function test_course_module_viewed() {
566554 // Checking that the event contains the expected values.
567555 $ this ->assertInstanceOf ('\mod_hsuforum\event\course_module_viewed ' , $ event );
568556 $ this ->assertEquals ($ context , $ event ->get_context ());
569- $ expected = array ($ course ->id , 'hsuforum ' , 'view forum ' , "view.php?f= {$ forum ->id }" , $ forum ->id , $ forum ->cmid );
570- $ this ->assertEventLegacyLogData ($ expected , $ event );
571557 $ url = new \moodle_url ('/mod/hsuforum/view.php ' , array ('f ' => $ forum ->id ));
572558 $ this ->assertEquals ($ url , $ event ->get_url ());
573559 $ this ->assertEventContextNotUsed ($ event );
@@ -666,8 +652,6 @@ public function test_subscription_created() {
666652 // Checking that the event contains the expected values.
667653 $ this ->assertInstanceOf ('\mod_hsuforum\event\subscription_created ' , $ event );
668654 $ this ->assertEquals ($ context , $ event ->get_context ());
669- $ expected = array ($ course ->id , 'hsuforum ' , 'subscribe ' , "view.php?f= {$ forum ->id }" , $ forum ->id , $ forum ->cmid );
670- $ this ->assertEventLegacyLogData ($ expected , $ event );
671655 $ url = new \moodle_url ('/mod/hsuforum/subscribers.php ' , array ('id ' => $ forum ->id ));
672656 $ this ->assertEquals ($ url , $ event ->get_url ());
673657 $ this ->assertEventContextNotUsed ($ event );
@@ -766,8 +750,6 @@ public function test_subscription_deleted() {
766750 // Checking that the event contains the expected values.
767751 $ this ->assertInstanceOf ('\mod_hsuforum\event\subscription_deleted ' , $ event );
768752 $ this ->assertEquals ($ context , $ event ->get_context ());
769- $ expected = array ($ course ->id , 'hsuforum ' , 'unsubscribe ' , "view.php?f= {$ forum ->id }" , $ forum ->id , $ forum ->cmid );
770- $ this ->assertEventLegacyLogData ($ expected , $ event );
771753 $ url = new \moodle_url ('/mod/hsuforum/subscribers.php ' , array ('id ' => $ forum ->id ));
772754 $ this ->assertEquals ($ url , $ event ->get_url ());
773755 $ this ->assertEventContextNotUsed ($ event );
@@ -857,8 +839,6 @@ public function test_readtracking_enabled() {
857839 // Checking that the event contains the expected values.
858840 $ this ->assertInstanceOf ('\mod_hsuforum\event\readtracking_enabled ' , $ event );
859841 $ this ->assertEquals ($ context , $ event ->get_context ());
860- $ expected = array ($ course ->id , 'hsuforum ' , 'start tracking ' , "view.php?f= {$ forum ->id }" , $ forum ->id , $ forum ->cmid );
861- $ this ->assertEventLegacyLogData ($ expected , $ event );
862842 $ url = new \moodle_url ('/mod/hsuforum/view.php ' , array ('f ' => $ forum ->id ));
863843 $ this ->assertEquals ($ url , $ event ->get_url ());
864844 $ this ->assertEventContextNotUsed ($ event );
@@ -948,8 +928,6 @@ public function test_readtracking_disabled() {
948928 // Checking that the event contains the expected values.
949929 $ this ->assertInstanceOf ('\mod_hsuforum\event\readtracking_disabled ' , $ event );
950930 $ this ->assertEquals ($ context , $ event ->get_context ());
951- $ expected = array ($ course ->id , 'hsuforum ' , 'stop tracking ' , "view.php?f= {$ forum ->id }" , $ forum ->id , $ forum ->cmid );
952- $ this ->assertEventLegacyLogData ($ expected , $ event );
953931 $ url = new \moodle_url ('/mod/hsuforum/view.php ' , array ('f ' => $ forum ->id ));
954932 $ this ->assertEquals ($ url , $ event ->get_url ());
955933 $ this ->assertEventContextNotUsed ($ event );
@@ -1020,8 +998,6 @@ public function test_subscribers_viewed() {
1020998 // Checking that the event contains the expected values.
1021999 $ this ->assertInstanceOf ('\mod_hsuforum\event\subscribers_viewed ' , $ event );
10221000 $ this ->assertEquals ($ context , $ event ->get_context ());
1023- $ expected = array ($ course ->id , 'hsuforum ' , 'view subscribers ' , "subscribers.php?id= {$ forum ->id }" , $ forum ->id , $ forum ->cmid );
1024- $ this ->assertEventLegacyLogData ($ expected , $ event );
10251001 $ this ->assertEventContextNotUsed ($ event );
10261002
10271003 $ this ->assertNotEmpty ($ event ->get_name ());
@@ -1105,9 +1081,6 @@ public function test_user_report_viewed() {
11051081 // Checking that the event contains the expected values.
11061082 $ this ->assertInstanceOf ('\mod_hsuforum\event\user_report_viewed ' , $ event );
11071083 $ this ->assertEquals ($ context , $ event ->get_context ());
1108- $ expected = array ($ course ->id , 'hsuforum ' , 'user report ' ,
1109- "user.php?id= {$ user ->id }&mode=discussions&course= {$ course ->id }" , $ user ->id );
1110- $ this ->assertEventLegacyLogData ($ expected , $ event );
11111084 $ this ->assertEventContextNotUsed ($ event );
11121085
11131086 $ this ->assertNotEmpty ($ event ->get_name ());
@@ -1306,9 +1279,6 @@ public function test_post_created() {
13061279 // Checking that the event contains the expected values.
13071280 $ this ->assertInstanceOf ('\mod_hsuforum\event\post_created ' , $ event );
13081281 $ this ->assertEquals ($ context , $ event ->get_context ());
1309- $ expected = array ($ course ->id , 'hsuforum ' , 'add post ' , "discuss.php?d= {$ discussion ->id }#p {$ post ->id }" ,
1310- $ forum ->id , $ forum ->cmid );
1311- $ this ->assertEventLegacyLogData ($ expected , $ event );
13121282 $ url = new \moodle_url ('/mod/hsuforum/discuss.php ' , array ('d ' => $ discussion ->id ));
13131283 $ url ->set_anchor ('p ' .$ event ->objectid );
13141284 $ this ->assertEquals ($ url , $ event ->get_url ());
@@ -1359,9 +1329,6 @@ public function test_post_created_single() {
13591329 // Checking that the event contains the expected values.
13601330 $ this ->assertInstanceOf ('\mod_hsuforum\event\post_created ' , $ event );
13611331 $ this ->assertEquals ($ context , $ event ->get_context ());
1362- $ expected = array ($ course ->id , 'hsuforum ' , 'add post ' , "view.php?f= {$ forum ->id }#p {$ post ->id }" ,
1363- $ forum ->id , $ forum ->cmid );
1364- $ this ->assertEventLegacyLogData ($ expected , $ event );
13651332 $ url = new \moodle_url ('/mod/hsuforum/view.php ' , array ('f ' => $ forum ->id ));
13661333 $ url ->set_anchor ('p ' .$ event ->objectid );
13671334 $ this ->assertEquals ($ url , $ event ->get_url ());
@@ -1567,8 +1534,6 @@ public function test_post_deleted() {
15671534 // Check that the events contain the expected values.
15681535 $ this ->assertInstanceOf ('\mod_hsuforum\event\post_deleted ' , $ event );
15691536 $ this ->assertEquals (context_module::instance ($ forum ->cmid ), $ event ->get_context ());
1570- $ expected = array ($ course ->id , 'hsuforum ' , 'delete post ' , "discuss.php?d= {$ discussion ->id }" , $ lastpost ->id , $ forum ->cmid );
1571- $ this ->assertEventLegacyLogData ($ expected , $ event );
15721537 $ url = new \moodle_url ('/mod/hsuforum/discuss.php ' , array ('d ' => $ discussion ->id ));
15731538 $ this ->assertEquals ($ url , $ event ->get_url ());
15741539 $ this ->assertEventContextNotUsed ($ event );
@@ -1588,8 +1553,6 @@ public function test_post_deleted() {
15881553 // Check that the event contains the expected values.
15891554 $ this ->assertInstanceOf ('\mod_hsuforum\event\post_deleted ' , $ event );
15901555 $ this ->assertEquals (context_module::instance ($ forum ->cmid ), $ event ->get_context ());
1591- $ expected = array ($ course ->id , 'hsuforum ' , 'delete post ' , "discuss.php?d= {$ discussion ->id }" , $ post ->id , $ forum ->cmid );
1592- $ this ->assertEventLegacyLogData ($ expected , $ event );
15931556 $ url = new \moodle_url ('/mod/hsuforum/discuss.php ' , array ('d ' => $ discussion ->id ));
15941557 $ this ->assertEquals ($ url , $ event ->get_url ());
15951558 $ this ->assertEventContextNotUsed ($ event );
@@ -1639,8 +1602,6 @@ public function test_post_deleted_single() {
16391602 // Checking that the event contains the expected values.
16401603 $ this ->assertInstanceOf ('\mod_hsuforum\event\post_deleted ' , $ event );
16411604 $ this ->assertEquals ($ context , $ event ->get_context ());
1642- $ expected = array ($ course ->id , 'hsuforum ' , 'delete post ' , "view.php?f= {$ forum ->id }" , $ post ->id , $ forum ->cmid );
1643- $ this ->assertEventLegacyLogData ($ expected , $ event );
16441605 $ url = new \moodle_url ('/mod/hsuforum/view.php ' , array ('f ' => $ forum ->id ));
16451606 $ this ->assertEquals ($ url , $ event ->get_url ());
16461607 $ this ->assertEventContextNotUsed ($ event );
@@ -1818,9 +1779,6 @@ public function test_post_updated() {
18181779 // Checking that the event contains the expected values.
18191780 $ this ->assertInstanceOf ('\mod_hsuforum\event\post_updated ' , $ event );
18201781 $ this ->assertEquals ($ context , $ event ->get_context ());
1821- $ expected = array ($ course ->id , 'hsuforum ' , 'update post ' , "discuss.php?d= {$ discussion ->id }#p {$ post ->id }" ,
1822- $ post ->id , $ forum ->cmid );
1823- $ this ->assertEventLegacyLogData ($ expected , $ event );
18241782 $ url = new \moodle_url ('/mod/hsuforum/discuss.php ' , array ('d ' => $ discussion ->id ));
18251783 $ url ->set_anchor ('p ' .$ event ->objectid );
18261784 $ this ->assertEquals ($ url , $ event ->get_url ());
@@ -1871,9 +1829,6 @@ public function test_post_updated_single() {
18711829 // Checking that the event contains the expected values.
18721830 $ this ->assertInstanceOf ('\mod_hsuforum\event\post_updated ' , $ event );
18731831 $ this ->assertEquals ($ context , $ event ->get_context ());
1874- $ expected = array ($ course ->id , 'hsuforum ' , 'update post ' , "view.php?f= {$ forum ->id }#p {$ post ->id }" ,
1875- $ post ->id , $ forum ->cmid );
1876- $ this ->assertEventLegacyLogData ($ expected , $ event );
18771832 $ url = new \moodle_url ('/mod/hsuforum/view.php ' , array ('f ' => $ forum ->id ));
18781833 $ url ->set_anchor ('p ' .$ post ->id );
18791834 $ this ->assertEquals ($ url , $ event ->get_url ());
0 commit comments