-
Bug
-
Resolution: Fixed
-
Minor
-
2.9.5, 3.0.3, 3.1
-
MOODLE_29_STABLE, MOODLE_30_STABLE, MOODLE_31_STABLE
-
MOODLE_29_STABLE, MOODLE_30_STABLE
-
MDL-53671-master -
The function book_export_contents returns a list of files in a book. The problem is that the filepath of each file is always set like this:
$file['filepath'] = "/{$chapter->id}/";
|
So if a file is inside one or more folders, the filepath doesn't contain them. Example:
Image inside /folder/image.jpg
|
filepath => '/1/'
|
filename => 'image.jpg'
|
fileurl => 'MOODLE/webservice/pluginfile.php/61/mod_book/chapter/1/folder/image.jpg'
|
In the example above, the filepath should also contain the folder: /1/folder/.