Permalink
Browse files

Merge branch 'MDL-52953-master' of git://github.com/abgreeve/moodle

  • Loading branch information...
dmonllao committed Jul 16, 2018
2 parents aa59fb2 + 28d0d12 commit c6f64c217dada673488880a44aee56839fba0944
Showing with 45 additions and 0 deletions.
  1. +37 −0 admin/tool/log/store/legacy/classes/log/store.php
  2. +8 −0 admin/tool/log/upgrade.txt
@@ -16,6 +16,8 @@
/**
* Legacy log reader.
* @deprecated since Moodle 3.6 MDL-52953 - Please use supported log stores such as "standard" or "external" instead.
* @todo MDL-52805 This is to be removed in Moodle 4.0
*
* @package logstore_legacy
* @copyright 2013 Petr Skoda {@link http://skodak.org}
@@ -30,6 +32,12 @@ class store implements \tool_log\log\store, \core\log\sql_reader {
use \tool_log\helper\store,
\tool_log\helper\reader;
/**
* @deprecated since Moodle 3.6 MDL-52953 - Please use supported log stores such as "standard" or "external" instead.
* @todo MDL-52805 This is to be removed in Moodle 4.0
*
* @param \tool_log\log\manager $manager
*/
public function __construct(\tool_log\log\manager $manager) {
$this->helper_setup($manager);
}
@@ -83,6 +91,17 @@ protected static function replace_sql_legacy($selectwhere, array $params, $sort
return array($selectwhere, $params, $sort);
}
/**
* @deprecated since Moodle 3.6 MDL-52953 - Please use supported log stores such as "standard" or "external" instead.
* @todo MDL-52805 This will be removed in Moodle 4.0
*
* @param string $selectwhere
* @param array $params
* @param string $sort
* @param int $limitfrom
* @param int $limitnum
* @return array
*/
public function get_events_select($selectwhere, array $params, $sort, $limitfrom, $limitnum) {
global $DB;
@@ -114,6 +133,8 @@ public function get_events_select($selectwhere, array $params, $sort, $limitfrom
/**
* Fetch records using given criteria returning a Traversable object.
* @deprecated since Moodle 3.6 MDL-52953 - Please use supported log stores such as "standard" or "external" instead.
* @todo MDL-52805 This will be removed in Moodle 4.0
*
* Note that the traversable object contains a moodle_recordset, so
* remember that is important that you call close() once you finish
@@ -146,6 +167,8 @@ public function get_events_select_iterator($selectwhere, array $params, $sort, $
/**
* Returns an event from the log data.
* @deprecated since Moodle 3.6 MDL-52953 - Please use supported log stores such as "standard" or "external" instead.
* @todo MDL-52805 This will be removed in Moodle 4.0
*
* @param stdClass $data Log data
* @return \core\event\base
@@ -154,6 +177,14 @@ public function get_log_event($data) {
return \logstore_legacy\event\legacy_logged::restore_legacy($data);
}
/**
* @deprecated since Moodle 3.6 MDL-52953 - Please use supported log stores such as "standard" or "external" instead.
* @todo MDL-52805 This will be removed in Moodle 4.0
*
* @param string $selectwhere
* @param array $params
* @return int
*/
public function get_events_select_count($selectwhere, array $params) {
global $DB;
@@ -170,13 +201,19 @@ public function get_events_select_count($selectwhere, array $params) {
/**
* Are the new events appearing in the reader?
* @deprecated since Moodle 3.6 MDL-52953 - Please use supported log stores such as "standard" or "external" instead.
* @todo MDL-52805 This will be removed in Moodle 4.0
*
* @return bool true means new log events are being added, false means no new data will be added
*/
public function is_logging() {
return (bool)$this->get_config('loglegacy', true);
}
/**
* @deprecated since Moodle 3.6 MDL-52953 - Please use supported log stores such as "standard" or "external" instead.
* @todo MDL-52805 This will be removed in Moodle 4.0
*/
public function dispose() {
}
@@ -0,0 +1,8 @@
This files describes API changes in /admin/tool/log - plugins,
information provided here is intended especially for developers.
=== 3.6 ===
* The legacy log store is in its first stage of deprecation and is due for removal in Moodle 4.0. Please use one of
the other log stores such as "standard" and "database".

0 comments on commit c6f64c2

Please sign in to comment.