Closed petersistrom closed 1 year ago
To test I ran the following code to insert data into the logs
GLOBAL $DB;
$dataobjects = [];
$res = (1661313653 - 1642996853) / 100;
for ($i = 1590465600; $i < 1661313653; $i += $res) {
$dataobjects[] = [
'eventname' => '\core\event\user_created',
'component' => 'core',
'action' => 'created',
'target' => 'user',
'crud' => 'r',
'edulevel' => 0,
'contextid' => 1,
'contextlevel' => 10,
'contextinstanceid' => 0,
'userid' => $i,
'anonymous' => 0,
'timecreated' => $i
];
}
$DB->insert_records('logstore_standard_log', $dataobjects);
Then backfilled Online Users for 2 months and the last value is displayed
I think it should be more descriptive than just saying '1', like "Last recorded '1' at 12:55", or similar.
This is intentional as this is going to get pushed elsewhere for consumption and I want it to be easy to cast to an int or float. So just put that in a code comment
Resolves #140