Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.3.1, 2.4.4, 2.5.3, 2.6
-
MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
-
MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
-
MDL-35032-master -
-
8
-
FRONTEND Sprint 7
Description
A linked or embedded image from the course_files in Moodle 1.9 is not converted when restoring a 1.9 backup in moodle 2.3.
Reason: https://github.com/moodle/moodle/blob/master/mod/book/backup/moodle1/lib.php
The moodle2-xml file is written before the images are migrated and so the @FILEPHP@ Links are not replaced by the @@PLUGINFILE@@ Links. $this->write_xml('chapter', $data, array('/chapter/id')); should be executed at the end.
public function process_book_chapters($data) {
|
$this->write_xml('chapter', $data, array('/chapter/id'));
|
|
// convert chapter files
|
$this->fileman->filearea = 'chapter';
|
$this->fileman->itemid = $data['id'];
|
$data['content'] = moodle1_converter::migrate_referenced_files($data['content'], $this->fileman);
|
}
|