Purge log may delete more than it should
Closed this issue · 1 comments
FMCorz commented
According to this piece of code, it seems that the courseid
is missing.
public function purge_log() {
global $DB;
$keeplogs = $this->get_config('keeplogs');
if (!$keeplogs) {
return;
} else {
// The cron is set to run only once a day, so no need to test the last time it was purged here.
$DB->delete_records_select('block_xp_log', 'time < :time', array(
'time' => time() - ($keeplogs * DAYSECS)
));
}
}
FMCorz commented
Resolved in v3.0.