mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 18:06:51 +02:00
MDL-48595 logstore: Replacing references to deprecated interfaces
This commit is contained in:
parent
1cfce08e63
commit
59aebbed70
19 changed files with 44 additions and 44 deletions
|
@ -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 = '';
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue