-
Improvement
-
Resolution: Fixed
-
Minor
-
3.5.5, 3.6, 3.7
-
Any
-
MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE
-
MOODLE_38_STABLE
-
master_
MDL-65201_Automated_backup_course_ordering -
Currently there is no forced order when getting the initial list of courses to be processed by automated backups. Not having a sort doesn't make the select random, instead the list of courses will tend to be always backed up in the same (albeit arbitrary) order.
This can lead to some undesirable behavior. Where the same courses are always backed up and some courses are rarely backed up.
This is best manifested in big sites where there are a lot of courses and a lot of change happening. And in situations where the automated backup process gets interrupted, or aborts.
This patch addresses this by applying some ordering to the way courses are backed up. It sets the following preference:
- Backup courses that do not have an entry in backup_courses first, as they are likely new and never been backed up.
- Backup courses that have the oldest next start time in backup_courses.
- Give preference to most recently modified courses over other courses.