diff --git a/admin/tool/log/store/legacy/tests/store_test.php b/admin/tool/log/store/legacy/tests/store_test.php index c78e013d1b8..e571a235991 100644 --- a/admin/tool/log/store/legacy/tests/store_test.php +++ b/admin/tool/log/store/legacy/tests/store_test.php @@ -70,10 +70,10 @@ class logstore_legacy_store_testcase extends advanced_testcase { $this->setUser($user2); add_to_log($course1->id, 'xxxx', 'yyyy', '', '7', 0, 0); - //$this->assertDebuggingCalled(); + $this->assertDebuggingCalled(); add_to_log($course2->id, 'aaa', 'bbb', 'info.php', '666', $module2->cmid, $user1->id); - //$this->assertDebuggingCalled(); + $this->assertDebuggingCalled(); $logs = $DB->get_records('log', array(), 'id ASC'); $this->assertCount(4, $logs); @@ -143,7 +143,7 @@ class logstore_legacy_store_testcase extends advanced_testcase { \logstore_legacy\event\unittest_executed::create( array('context' => \context_system::instance(), 'other' => array('sample' => 5, 'xx' => 10)))->trigger(); add_to_log($course1->id, 'xxxx', 'yyyy', '', '7', 0, 0); - //$this->assertDebuggingCalled(); + $this->assertDebuggingCalled(); $this->assertEquals(4, $DB->count_records('log')); // Another way to disable legacy completely. @@ -154,7 +154,7 @@ class logstore_legacy_store_testcase extends advanced_testcase { \logstore_legacy\event\unittest_executed::create( array('context' => \context_system::instance(), 'other' => array('sample' => 5, 'xx' => 10)))->trigger(); add_to_log($course1->id, 'xxxx', 'yyyy', '', '7', 0, 0); - //$this->assertDebuggingCalled(); + $this->assertDebuggingCalled(); $this->assertEquals(4, $DB->count_records('log')); // Set everything back. set_config('enabled_stores', '', 'tool_log'); diff --git a/lib/deprecatedlib.php b/lib/deprecatedlib.php index 1897b76bd80..4e57a7d8c23 100644 --- a/lib/deprecatedlib.php +++ b/lib/deprecatedlib.php @@ -31,11 +31,7 @@ defined('MOODLE_INTERNAL') || die(); /** - * Add an entry to the log table. - * - * Add an entry to the log table. These are "action" focussed rather - * than web server hits, and provide a way to easily reconstruct what - * any particular student has been doing. + * Add an entry to the legacy log table. * * @deprecated since 2.7 use new events instead * @@ -49,8 +45,7 @@ defined('MOODLE_INTERNAL') || die(); * @return void */ function add_to_log($courseid, $module, $action, $url='', $info='', $cm=0, $user=0) { - // TODO: Uncomment after all add_to_log() are removed from standard distribution - ideally before 2.7 release. - //debugging('ideally all add_to_log() calls should be replaced() with new events', DEBUG_DEVELOPER); + debugging('add_to_log() has been deprecated, please rewrite your code to the new events API', DEBUG_DEVELOPER); // This is a nasty hack that allows us to put all the legacy stuff into legacy storage, // this way we may move all the legacy settings there too.