Skip to content

Commit

Permalink
Merge branch 'MDL-52953-master' of git://github.com/abgreeve/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
David Monllao committed Jul 16, 2018
2 parents aa59fb2 + 28d0d12 commit c6f64c2
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
37 changes: 37 additions & 0 deletions admin/tool/log/store/legacy/classes/log/store.php
Expand Up @@ -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}
Expand All @@ -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);
}
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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;

Expand All @@ -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() {
}

Expand Down
8 changes: 8 additions & 0 deletions admin/tool/log/upgrade.txt
@@ -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.