MDL-28505 Backup: Asynchronous backup and restore
authorMatt Porritt <mattp@catalyst-au.net>
Thu, 20 Dec 2018 04:32:46 +0000 (15:32 +1100)
committerMatt Porritt <mattp@catalyst-au.net>
Tue, 9 Apr 2019 00:15:42 +0000 (00:15 +0000)
commit2cd901a4e7bcf24d053f161d806fb9f4a4e978d3
tree509c4f4e4d488dc4c367744e0902c45469f0e794
parent9d4f4f0051290d0dc72aaa90d4b9b00f30914529
MDL-28505  Backup: Asynchronous backup and restore

This patch adds asynchronous backup and restore functionality
to Moodle. This is an optional feature and is not enabled by
default. It can be enabled by site administrators.
Asynchronous backup and restores are actioned by the Moodle
adhoc task API. The progress of backup and restores is
displayedin the Moodle UI.  Users can also be sent a message
when a backup or restore operation completes via the
Moodle messaging API.
35 files changed:
admin/settings/courses.php
admin/settings/subsystems.php
backup/backup.class.php
backup/backup.php
backup/controller/backup_controller.class.php
backup/controller/restore_controller.class.php
backup/externallib.php [new file with mode: 0644]
backup/restore.php
backup/restorefile.php
backup/tests/async_backup_test.php [new file with mode: 0644]
backup/tests/async_restore_test.php [new file with mode: 0644]
backup/util/dbops/backup_controller_dbops.class.php
backup/util/helper/async_helper.class.php [new file with mode: 0644]
backup/util/helper/tests/async_helper_test.php [new file with mode: 0644]
backup/util/includes/backup_includes.php
backup/util/includes/restore_includes.php
backup/util/ui/amd/build/async_backup.min.js [new file with mode: 0644]
backup/util/ui/amd/src/async_backup.js [new file with mode: 0644]
backup/util/ui/renderer.php
course/delete.php
course/view.php
lang/en/backup.php
lang/en/moodle.php
lib/classes/progress/db_updater.php [new file with mode: 0644]
lib/classes/task/asynchronous_backup_task.php [new file with mode: 0644]
lib/classes/task/asynchronous_restore_task.php [new file with mode: 0644]
lib/db/install.xml
lib/db/messages.php
lib/db/services.php
lib/db/upgrade.php
lib/templates/async_backup_progress.mustache [new file with mode: 0644]
lib/templates/async_backup_progress_row.mustache [new file with mode: 0644]
lib/templates/async_backup_status.mustache [new file with mode: 0644]
lib/templates/async_restore_progress_row.mustache [new file with mode: 0644]
version.php