Merge branch 'MDL-73421-master' of https://github.com/marinaglancy/moodle

This commit is contained in:
Andrew Nicols 2022-09-27 17:06:51 +08:00
commit 182649d7d5
3 changed files with 3 additions and 3 deletions

View File

@ -88,7 +88,7 @@ abstract class restore_tool_log_logstore_subplugin extends restore_subplugin {
// There is no need to roll dates. Logs are supposed to be immutable. See MDL-44961.
// Revert other to its original php way.
$data->other = \tool_log\helper\reader::decode_other(base64_decode($data->other));
$data->other = \tool_log\local\privacy\helper::decode_other(base64_decode($data->other));
// Arrived here, we have both 'objectid' and 'other' to be converted. This is the tricky part.
// Both are pointing to other records id, but the sources are not identified in the

View File

@ -85,7 +85,7 @@ class helper {
} else {
$name = $record->eventname;
$description = "Unknown event ({$name})";
$other = \tool_log\helper\reader::decode_other($record->other);
$other = self::decode_other($record->other);
}
$realuserid = $record->realuserid;

View File

@ -146,7 +146,7 @@ class send_failed_login_notifications_task extends scheduled_task {
$a->time = userdate($log->timecreated);
if (empty($log->username)) {
// Entries with no valid username. We get attempted username from the event's other field.
$other = \tool_log\helper\reader::decode_other($log->other);
$other = \tool_log\local\privacy\helper::decode_other($log->other);
$a->info = empty($other['username']) ? '' : $other['username'];
$a->name = get_string('unknownuser');
} else {