This commit is contained in:
Andrew Nicols 2015-02-03 16:02:59 +08:00
commit 70b7861da2
3 changed files with 3 additions and 3 deletions

View File

@ -1028,7 +1028,7 @@ class core_course_external extends external_api {
// Check if we need to unzip the file because the backup temp dir does not contains backup files.
if (!file_exists($backupbasepath . "/moodle_backup.xml")) {
$file->extract_to_pathname(get_file_packer(), $backupbasepath);
$file->extract_to_pathname(get_file_packer('application/vnd.moodle.backup'), $backupbasepath);
}
// Create new course.

View File

@ -1726,7 +1726,7 @@ class core_course_courselib_testcase extends advanced_testcase {
$bc->execute_plan();
$results = $bc->get_results();
$file = $results['backup_destination'];
$fp = get_file_packer();
$fp = get_file_packer('application/vnd.moodle.backup');
$filepath = $CFG->dataroot . '/temp/backup/test-restore-course-event';
$file->extract_to_pathname($fp, $filepath);
$bc->destroy();

View File

@ -186,7 +186,7 @@ class core_questionlib_testcase extends advanced_testcase {
$bc->execute_plan();
$results = $bc->get_results();
$file = $results['backup_destination'];
$fp = get_file_packer();
$fp = get_file_packer('application/vnd.moodle.backup');
$filepath = $CFG->dataroot . '/temp/backup/test-restore-course';
$file->extract_to_pathname($fp, $filepath);
$bc->destroy();