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.
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
require_once('../config.php');
|
||||
require_once('lib.php');
|
||||
require_once($CFG->libdir.'/completionlib.php');
|
||||
require_once($CFG->dirroot . '/backup/util/includes/backup_includes.php');
|
||||
|
||||
$id = optional_param('id', 0, PARAM_INT);
|
||||
$name = optional_param('name', '', PARAM_TEXT);
|
||||
@@ -243,6 +244,10 @@
|
||||
$PAGE->set_heading($course->fullname);
|
||||
echo $OUTPUT->header();
|
||||
|
||||
if ($USER->editing == 1 && async_helper::is_async_pending($id, 'course', 'backup')) {
|
||||
echo $OUTPUT->notification(get_string('pendingasyncedit', 'backup'), 'warning');
|
||||
}
|
||||
|
||||
if ($completion->is_enabled()) {
|
||||
// This value tracks whether there has been a dynamic change to the page.
|
||||
// It is used so that if a user does this - (a) set some tickmarks, (b)
|
||||
|
||||
Reference in New Issue
Block a user