moodle-tool_mergeusers icon indicating copy to clipboard operation
moodle-tool_mergeusers copied to clipboard

cron to delete old records after X time passed

Open jpahullo opened this issue 6 years ago • 3 comments

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.

jpahullo avatar May 24 '18 12:05 jpahullo

I think, @danmarsden, this is something you told us to implement on the other issue, isn't it?

jpahullo avatar May 24 '18 12:05 jpahullo

Yeah - makes sense to clean up logs after a time period - I need to implement this in some of my plugins too. :-)

danmarsden avatar May 24 '18 23:05 danmarsden

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...

jpahullo avatar May 25 '18 06:05 jpahullo