MDL-55192 log: Final deprecation of add_to_log

This commit is contained in:
John Okely 2017-01-06 10:30:30 +08:00 committed by Peter Dias
parent 49a9e8b07d
commit d464fb43d6
2 changed files with 3 additions and 20 deletions

View File

@ -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');
}
/**

View File

@ -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().