Problem with exporting book using Wordimport plugin

Re: Problem with exporting book using Wordimport plugin

by Eoin Campbell -
Number of replies: 0
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
I suspect that some of the HTML markup inside your book contains invalid XHTML. The export facility tries to fix up bad markup by running the content through a HTMLTidy process, but it can fail with particularly awkward content. If text was copied from Word and pasted into a book a long time ago, for example (before the Atto editor cleaned up this content automatically), then this could happen. There are a number of steps you can take to get around this.
1. Open each chapter in the Atto text editor and save it again. Atto will clean up the content when it saves it.
2. If that doesn't fix it, export each chapter individually and identify the one causing the problem. Open that chapter in the Atto editor, go to raw HTML view (expand the first icon in the Atto toolbar (a down-arrow), and then click the last icon to see the raw HTML ("</>")). Copy and paste the HTML text into an online HTML Tidy website like https://htmltidy.net/. This might do a better job cleaning it up.
3. If neither works, try installing a plugin to export (and import the book to an ePub (cf. https://moodle.org/plugins/browse.php?list=category&id=56). Then export to ePub, which should ensure the output is valid XHTML. Re-import it into a different book, and export that book into Word format.