Moodle Books are a surprise workhorse of Project Bob.
Canvas content imports into Moodle as pages. Lots of pages. This makes for excessive navigation for students and academics – not a good experience.
Moodle Books were selected for the better experience in navigating content. Similarly it’s quick to edit individual book chapters/sub-chapters. The small effort to convert Canvas Pages to Moodle Book Chapters was acceptable.
The challenge is to automate getting content in along with images and linked files.
Moodle Books has a Import chapter feature. It can ingest a zip file containing html files (each one becomes a ‘chapters’), images and documents:
The trick is to prepare the html files first:
The plainer and cleaner the HTML source code, the more success you will have. Both Adobe Dreamweaver and Atom Editor are useful tools for making large changes across multiple files quickly. Stripping out Canvas styles and span tag element. Simplifying tables, removing widths, heights, colours all go for making better behaved content.
Similarly, you can add attributes specific to your LMS eg for <IFrames>, setting the attribute FRAMEBORDER=”0″ can be helpful.
Chapter headings are automatically created based on the title tag element. Saves you from a renaming task.
Files and images
The trick here is to identify files and images with a relative path (not a full path or web address) and then strip that path, leaving just the filename and extension.
Useful RegEx for advanced users:
CLEANING CANVAS CONTENT EXPORT Find whole path+filename w. RegEx=On: (%24IMS-CC-FILEBASE%24)([\w\-\/%\:\.]*[\b\w%\:\.]+)?
Bonus: Converting PDFs
A recent discovery: Adobe Acrobat Pro can create html files and images inside a folder, in the exact format required for Moodle Books importing:
Prepare the PDF
Open the PDF to be converted in Acrobat Pro, work through each page identifying the html page split points:
- This may be the top of an image above a heading
- At the split point, right click and select Add bookmark
- Give it a sensible name – it will appear in the Moodle Book chapter title
- Once all split points/bookmarks are set, save the PDF file replete with new bookmarks.
Export the PDF
- Still in Acrobat, go to the Tools tab
- Select Export PDF
- Select HTML Web page
- Select Multiple HTML page
- Split by Doc Bookmarks
- Save the file (tip: create a new folder for it).
Prepare for import into Moodle Book
- Open the folder containing the export.
- Zip the images and html files.
- Go to the LMS and add you Moodle Book.
- Import the zip file as 1 file = 1 chapter.
- Start the normal Moodle Book cleansing process.
NB: diagrams may be text rather than image – use a screenshot instead.