mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Merge branch 'tgz_fixing' of https://github.com/tlevi/moodle
This commit is contained in:
commit
70b7861da2
@ -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.
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user