moodle-tool_mergeusers
moodle-tool_mergeusers copied to clipboard
cron to delete old records after X time passed
As an admin I want to set up a relative deadline after which any existing log older than this relative deadline is deleted.
Notes
- It can be implemented as a programmed task to run daily or monthly.
Acceptance conditions
- [ ] I see a new plugin's setting to define relative deadline, measured in number of days.
- [ ] I see a programmed task that removes logs older (greater) than specified number of days.
- [ ] If I set up 0 days, logs are never removed.
I think, @danmarsden, this is something you told us to implement on the other issue, isn't it?
Yeah - makes sense to clean up logs after a time period - I need to implement this in some of my plugins too. :-)
Some package on packagist, specific for Moodle (depending on global $DB
), with specification of a table name (without prefix) and time field to use on the filtering criteria, could be a good idea? Or is there any other option inside Moodle to have it... a local plugin? However, it sounds strange to have other components modifying your own plugin...
In the end, I would like to have something generic that could be reused...