mirror of
https://github.com/moodle/moodle.git
synced 2025-01-31 04:33:13 +01:00
Merge branch 'MDL-65649' of https://github.com/paulholden/moodle
This commit is contained in:
commit
f2e7a54f2a
@ -91,7 +91,6 @@ class core_backup_external extends external_api {
|
||||
require_capability('moodle/backup:backupactivity', $context);
|
||||
} else {
|
||||
require_capability('moodle/backup:backupcourse', $context);
|
||||
$instanceid = $course->id;
|
||||
}
|
||||
|
||||
$results = array();
|
||||
|
@ -55,9 +55,11 @@ require_capability('moodle/restore:restorecourse', $context);
|
||||
if (is_null($course)) {
|
||||
$coursefullname = $SITE->fullname;
|
||||
$courseshortname = $SITE->shortname;
|
||||
$courseurl = new moodle_url('/');
|
||||
} else {
|
||||
$coursefullname = $course->fullname;
|
||||
$courseshortname = $course->shortname;
|
||||
$courseurl = course_get_url($course->id);
|
||||
}
|
||||
|
||||
// Show page header.
|
||||
@ -173,7 +175,6 @@ if ($restore->get_stage() != restore_ui::STAGE_PROCESS) {
|
||||
\core\task\manager::queue_adhoc_task($asynctask);
|
||||
|
||||
// Add ajax progress bar and initiate ajax via a template.
|
||||
$courseurl = new moodle_url('/course/view.php', array('id' => $course->id));
|
||||
$restoreurl = new moodle_url('/backup/restorefile.php', array('contextid' => $contextid));
|
||||
$progresssetup = array(
|
||||
'backupid' => $restoreid,
|
||||
@ -182,7 +183,6 @@ if ($restore->get_stage() != restore_ui::STAGE_PROCESS) {
|
||||
'restoreurl' => $restoreurl->out()
|
||||
);
|
||||
echo $renderer->render_from_template('core/async_backup_status', $progresssetup);
|
||||
|
||||
}
|
||||
|
||||
$restore->destroy();
|
||||
|
Loading…
x
Reference in New Issue
Block a user