MDL-48595 logstore: Replacing references to deprecated interfaces

This commit is contained in:
David Monllao 2015-02-23 16:18:51 +08:00
parent 1cfce08e63
commit 59aebbed70
19 changed files with 44 additions and 44 deletions

View file

@ -134,7 +134,7 @@ if ($uselegacyreader) {
$views = $DB->get_records_sql($sql, $params);
}
// Get record from sql_internal_reader and merge with records obtained from legacy log (if needed).
// Get record from sql_internal_table_reader and merge with records obtained from legacy log (if needed).
if ($useinternalreader) {
// Check if we need to show the last access.
$sqllasttime = '';

View file

@ -114,7 +114,7 @@ function report_outline_page_type_list($pagetype, $parentcontext, $currentcontex
* @return bool returns true if the store is supported by the report, false otherwise.
*/
function report_outline_supports_logstore($instance) {
if ($instance instanceof \core\log\sql_internal_reader || $instance instanceof \logstore_legacy\log\store) {
if ($instance instanceof \core\log\sql_internal_table_reader || $instance instanceof \logstore_legacy\log\store) {
return true;
}
return false;

View file

@ -87,8 +87,8 @@ function report_outline_get_common_log_variables() {
$uselegacyreader = true;
}
// If sql_internal_reader is preferred reader.
if ($reader instanceof \core\log\sql_internal_reader) {
// If sql_internal_table_reader is preferred reader.
if ($reader instanceof \core\log\sql_internal_table_reader) {
$useinternalreader = true;
$logtable = $reader->get_internal_log_table_name();
$minloginternalreader = $DB->get_field_sql('SELECT min(timecreated) FROM {' . $logtable . '}');
@ -144,7 +144,7 @@ function report_outline_user_outline($userid, $cmid, $module, $instanceid) {
}
}
// Get record from sql_internal_reader and combine with the number of views from the legacy log table (if needed).
// Get record from sql_internal_table_reader and combine with the number of views from the legacy log table (if needed).
if ($useinternalreader) {
$params = array('userid' => $userid, 'contextlevel' => CONTEXT_MODULE, 'contextinstanceid' => $cmid, 'crud' => 'r',
'edulevel1' => core\event\base::LEVEL_PARTICIPATING, 'edulevel2' => core\event\base::LEVEL_TEACHING,
@ -223,7 +223,7 @@ function report_outline_user_complete($userid, $cmid, $module, $instanceid) {
}
}
// Get record from sql_internal_reader and combine with the number of views from the legacy log table (if needed).
// Get record from sql_internal_table_reader and combine with the number of views from the legacy log table (if needed).
if ($useinternalreader) {
$params = array('userid' => $userid, 'contextlevel' => CONTEXT_MODULE, 'contextinstanceid' => $cmid, 'crud' => 'r',
'edulevel1' => core\event\base::LEVEL_PARTICIPATING, 'edulevel2' => core\event\base::LEVEL_TEACHING,