diff --git a/lib/deprecatedlib.php b/lib/deprecatedlib.php index 1327d93cfa3..1b3511f70aa 100644 --- a/lib/deprecatedlib.php +++ b/lib/deprecatedlib.php @@ -33,28 +33,10 @@ defined('MOODLE_INTERNAL') || die(); /* === Functions that needs to be kept longer in deprecated lib than normal time period === */ /** - * Add an entry to the legacy log table. - * * @deprecated since 2.7 use new events instead - * - * @param int $courseid The course id - * @param string $module The module name e.g. forum, journal, resource, course, user etc - * @param string $action 'view', 'update', 'add' or 'delete', possibly followed by another word to clarify. - * @param string $url The file and parameters used to see the results of the action - * @param string $info Additional description information - * @param int $cm The course_module->id if there is one - * @param int|stdClass $user If log regards $user other than $USER - * @return void */ -function add_to_log($courseid, $module, $action, $url='', $info='', $cm=0, $user=0) { - 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. - $manager = get_log_manager(); - if (method_exists($manager, 'legacy_add_to_log')) { - $manager->legacy_add_to_log($courseid, $module, $action, $url, $info, $cm, $user); - } +function add_to_log() { + throw new coding_exception('add_to_log() has been removed, please rewrite your code to the new events API'); } /** diff --git a/lib/upgrade.txt b/lib/upgrade.txt index fd1f97d3f43..d1e8450ca79 100644 --- a/lib/upgrade.txt +++ b/lib/upgrade.txt @@ -8,6 +8,7 @@ information provided here is intended especially for developers. of 'scrollable' is true. * The `$CFG->behat_retart_browser_after` configuration setting has been removed. The browser session is now restarted between all tests. +* add_to_log() has been through final deprecation, please rewrite your code to the new events API. === 3.9 === * Following function has been deprecated, please use \core\task\manager::run_from_cli().