mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-50602 - Automated backup: Remove old backups associated to courses
Refactoring and renaming of settings.
This commit is contained in:
parent
694f195da0
commit
2b7c85da17
8 changed files with 311 additions and 184 deletions
|
@ -226,7 +226,8 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
|
|||
);
|
||||
$temp->add(new admin_setting_configselect('backup/backup_auto_storage', new lang_string('automatedstorage', 'backup'), new lang_string('automatedstoragehelp', 'backup'), 0, $storageoptions));
|
||||
$temp->add(new admin_setting_special_backup_auto_destination());
|
||||
$keepoptoins = array(
|
||||
|
||||
$maxkeptoptions = array(
|
||||
0 => new lang_string('all'), 1 => '1',
|
||||
2 => '2',
|
||||
5 => '5',
|
||||
|
@ -240,7 +241,44 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
|
|||
300 => '300',
|
||||
400 => '400',
|
||||
500 => '500');
|
||||
$temp->add(new admin_setting_configselect('backup/backup_auto_keep', new lang_string('keep'), new lang_string('backupkeephelp'), 1, $keepoptoins));
|
||||
$temp->add(new admin_setting_configselect('backup/backup_auto_max_kept', new lang_string('automatedmaxkept', 'backup'),
|
||||
new lang_string('automatedmaxkepthelp', 'backup'), 1, $maxkeptoptions));
|
||||
|
||||
$automateddeletedaysoptions = array(
|
||||
0 => new lang_string('never'),
|
||||
1000 => new lang_string('numdays', '', 1000),
|
||||
365 => new lang_string('numdays', '', 365),
|
||||
180 => new lang_string('numdays', '', 180),
|
||||
150 => new lang_string('numdays', '', 150),
|
||||
120 => new lang_string('numdays', '', 120),
|
||||
90 => new lang_string('numdays', '', 90),
|
||||
60 => new lang_string('numdays', '', 60),
|
||||
35 => new lang_string('numdays', '', 35),
|
||||
10 => new lang_string('numdays', '', 10),
|
||||
5 => new lang_string('numdays', '', 5),
|
||||
2 => new lang_string('numdays', '', 2)
|
||||
);
|
||||
$temp->add(new admin_setting_configselect('backup/backup_auto_delete_days', new lang_string('automateddeletedays', 'backup'),
|
||||
'', 0, $automateddeletedaysoptions));
|
||||
|
||||
$minkeptoptions = array(
|
||||
0 => new lang_string('none'),
|
||||
1 => '1',
|
||||
2 => '2',
|
||||
5 => '5',
|
||||
10 => '10',
|
||||
20 => '20',
|
||||
30 => '30',
|
||||
40 => '40',
|
||||
50 => '50',
|
||||
100 => '100',
|
||||
200 => '200',
|
||||
300 => '300',
|
||||
400 => '400'
|
||||
);
|
||||
$temp->add(new admin_setting_configselect('backup/backup_auto_min_kept', new lang_string('automatedminkept', 'backup'),
|
||||
new lang_string('automatedminkepthelp', 'backup'), 0, $minkeptoptions));
|
||||
|
||||
$temp->add(new admin_setting_configcheckbox('backup/backup_shortname', new lang_string('backup_shortname', 'admin'), new lang_string('backup_shortnamehelp', 'admin'), 0));
|
||||
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_skip_hidden', new lang_string('skiphidden', 'backup'), new lang_string('skiphiddenhelp', 'backup'), 1));
|
||||
$temp->add(new admin_setting_configselect('backup/backup_auto_skip_modif_days', new lang_string('skipmodifdays', 'backup'), new lang_string('skipmodifdayshelp', 'backup'), 30, array(
|
||||
|
@ -262,45 +300,6 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
|
|||
)));
|
||||
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_skip_modif_prev', new lang_string('skipmodifprev', 'backup'), new lang_string('skipmodifprevhelp', 'backup'), 0));
|
||||
|
||||
// Automated backup removal section.
|
||||
$temp->add(new admin_setting_heading('automatedbackupremovalsettings',
|
||||
new lang_string('automatedbackupremovalsettings', 'backup'), ''));
|
||||
|
||||
$temp->add(new admin_setting_configselect('backup/backup_auto_keep_days', new lang_string('automatedbackupkeepdays', 'backup'),
|
||||
new lang_string('automatedbackupkeepdayshelp', 'backup'), 0, array(
|
||||
0 => new lang_string('never'),
|
||||
1000 => new lang_string('numdays', '', 1000),
|
||||
365 => new lang_string('numdays', '', 365),
|
||||
180 => new lang_string('numdays', '', 180),
|
||||
150 => new lang_string('numdays', '', 150),
|
||||
120 => new lang_string('numdays', '', 120),
|
||||
90 => new lang_string('numdays', '', 90),
|
||||
60 => new lang_string('numdays', '', 60),
|
||||
35 => new lang_string('numdays', '', 35),
|
||||
10 => new lang_string('numdays', '', 10),
|
||||
5 => new lang_string('numdays', '', 5),
|
||||
2 => new lang_string('numdays', '', 2)
|
||||
)));
|
||||
|
||||
$temp->add(new admin_setting_configselect('backup/backup_auto_keep_copies',
|
||||
new lang_string('automatedbackupkeepcopies', 'backup'), new lang_string('automatedbackupkeepcopieshelp', 'backup'),
|
||||
0, array(
|
||||
0 => new lang_string('none'),
|
||||
1 => '1',
|
||||
2 => '2',
|
||||
5 => '5',
|
||||
10 => '10',
|
||||
20 => '20',
|
||||
30 => '30',
|
||||
40 => '40',
|
||||
50 => '50',
|
||||
100 => '100',
|
||||
200 => '200',
|
||||
300 => '300',
|
||||
400 => '400',
|
||||
500 => '500'
|
||||
)));
|
||||
|
||||
// Automated defaults section.
|
||||
$temp->add(new admin_setting_heading('automatedsettings', new lang_string('automatedsettings','backup'), ''));
|
||||
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_users', new lang_string('generalusers', 'backup'), new lang_string('configgeneralusers', 'backup'), 1));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue