From our SLE Project Manager:
All courses are automatically backed up if scheduled backups are turned on. For old courses or 'read only' courses this leads to an unnecessary load on the daily backups. Proposal is to add an option in course settings so that scheduled backup can be turned off if required.
Steps to achieve solution
~~~~~~~~~~~~~~~~~~~
1. edit moodle/course/edit_form.php to add a new button, I added this at bottom of General section
2. this requires a help string and some additional language strings, so create these in /lang/en/moodle.php
4. next we need to add the config option to the config_plugins table along with a default value (1 for ON)
INSERT INTO m_config_plugins (PLUGIN, NAME, VALUE) VALUES ('moodlecourse','autobackup','1')
5. then we need to add a field to the course table to store the setting
ALTER TABLE m_course ADD COLUMN 'autobackup' BOOLEAN NOT NULL DEFAULT 1 AFTER 'completionnotify';
6. finally, need to add code to backup_scheduled.php and backup_cron_helper.class.php to tell scheduled backup routine to skip a course if the setting = NO (0)
Patch for Moodle 2.1 is attached
- duplicates
-
MDL-60296 Define courses that automatic backup should skip or backup without logs
-
- Closed
-