This commit is contained in:
Eloy Lafuente (stronk7) 2020-01-13 18:56:38 +01:00
commit f2e7a54f2a
2 changed files with 2 additions and 3 deletions

View File

@ -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();

View File

@ -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();