EPUB import
Maintained by
Robert Watson
Import EPUB ebooks into Moodle Book resources with support for reflowable and fixed-layout formats.
Comments
Comments are no longer open for new posts. Existing comments remain available to read.
Yes, EPUB import should appear visibly in the Book activity tools/menu for users with the capability.
No additional setting should be required beyond capability + being in a Book activity.
Node/Playwright should only matter for special fixed-layout/CSS-overlay handling, not standard reflowable EPUBs.
Yes, we should expose/log the caught exception for admins while keeping the user-facing message polite.
The repo has test.
I tested booktool_epubimport 2.0.0-beta2 (2026041100) on a local Moodle site before considering it for production use. The plugin page lists support for Moodle 4.4, 4.5, 5.0, 5.1, and 5.2.
The plugin installed successfully and appears under Book tools as:
EPUB import
booktool_epubimport
2.0.0-beta2
2026041100
The capability booktool/epubimport:import was also created correctly and was available for Teacher and Manager roles.
However, I ran into several issues during testing:
1. The EPUB import option did not appear in the standard Book activity tools/menu area. I could see the normal Book tools such as Import chapter, Print book, Print chapter, Generate IMS CP, and Permissions, but I did not see an EPUB import option. I was only able to reach the EPUB import page by manually changing the URL to the epubimport tool path.
2. Once I reached the import page directly, the import initially failed with:
Exception - Class "notification" not found
In mod/book/tool/epubimport/index.php, the plugin references:
notification::NOTIFY_SUCCESS
notification::NOTIFY_ERROR
Changing those to the Moodle namespaced output notification class allowed the process to continue:
\core\output\notification::NOTIFY_SUCCESS
\core\output\notification::NOTIFY_ERROR
3. After that change, the import process reached the EPUB handling step, but failed with the generic message:
The EPUB import could not be completed. Please check the EPUB package and try again.
I tested more than one EPUB file and received the same result.
4. My local PHP environment has ZIP and XML support enabled:
zip
libxml
xml
xmlreader
xmlwriter
I also saw a related review note from April 8, 2026 that listed several items needing attention, including incorrect repository name, missing boilerplate headers, insecure directory permissions, PHPDoc inconsistency, hard-coded language strings, JS implementation updates, and missing language string definitions.
Because this release is listed as supporting Moodle 4.5/5.0+, I wanted to report both the missing Book menu/tool link and the runtime/import errors.
Questions:
* Should EPUB import appear as a visible option in the standard Book activity tools menu?
* Is there an additional setting required to make the EPUB import tool appear in the Book interface?
* Is Node.js/Playwright required only for fixed-layout EPUBs, or can the importer trigger that requirement for other EPUBs too?
* Is there a way to expose the actual caught exception instead of only the generic “EPUB package” message?
* Are there specific EPUB formatting requirements or sample EPUB files recommended for testing?
* Have the April 8 review items been fully resolved in 2.0.0-beta2?
Thank you for working on this plugin. EPUB-to-Book import would be very useful, but based on this testing I would not be comfortable moving it to a production Moodle site yet without clarification or a fix.