It seems decision to keep logs (not delete them) when resetting a course was taken without much more discussion.
Why it's not always a good solution :
- As someone explained in
MDL-43274comments, it could allow some new teacher in a course to see what was done before he's in (for a new semester/year)
- It takes lot of place in Moodle's internal DB
- it then generates bigger backup files (when including logs)
- if your server miss disk place (because of logs, in DB/backups), the recommandation is generally to lower the time before deleting logs (globally) by the dedicated scheduled task. But the problem is that it then implies to delete all logs for all courses.
- if you know that a semester (or year) ended, and you made good backups (with logs) corresponding at this ended period of time (or course by course, or the whole plateform), you can delete corresponding logs in live platform for these courses
- that would allow to keep only current logs for current semester courses, and also to keep indefinitly (or 1000 days) logs for other specials courses you don't want to lose logs (or have them spliced in several backups).
What i think should be done :
- create a new capability (something like moodle/course:resetlogs ?) allowing to delete logs when reseting a course
- the risk (that was the base to open
MDL-43274) would be a teacher deleting logs, with impossibility to understand what happened before
- so this capability should be unset for teachers, but would allow administrator (and managers ?) to delete logs when resetting courses.
That would allow Administrator to delete these (old) logs (with benefits it can make), and keep security about teachers actions (with benefits it can have).
Like before 2.7.1, the (Admin/Manager) user should be able to choose (with a tick box) if he wants to delete logs when resetting a course.
Perhaps this could be achieved by an ad-hoc task that would delete course logs after course reset are terminated, allowing quick course reset for the user.