## General plugins (Local): Wiki export

local_wikiexport
Maintained by Davo Smith
This plugin adds the ability to export Moodle wikis as either PDFs or epub documents.
79 sites
8 fans

# Wiki export

This plugin adds the ability to export Moodle wikis as either PDFs or epub documents. It was commissioned by the Judicial Institute for Scotland, originally for their Totara LMS implementation, with Synergy Learning as the chosen partner, with Davo Smith providing the development work.

Many thanks to Jackie Carter - Learning Technology Manager, and the rest of the team, at the Judicial Institute for contributing this development back in to the Moodle community.

Further development of this plugin is planned for early 2015.

# Usage

Once the plugin is installed, you can visit a wiki, then click on the new 'Export as epub' or 'Export as PDF' links that appear in the activity administration block (with javascript enabled, similar links are inserted on the top-right corner of the page).

Users with the 'mod/wiki:managewiki' capability also get a 'Sort pages for export' link, that allows them to choose the order in which pages will appear in the export.

There is an additional global setting which allows a copy of any wikis on the site to be sent (as a PDF) to a given email address, whenever they are updated (note, this will not export all wikis on the site the first time it is configured, it only sends those that have been updated since the email address was first entered).

# Customising

If you want to add your organisation's logo to the front page of the exported wiki, please replace the file local/wikiexport/pix/logo.png with your logo. Do not alter the file dimensions, it must remain 514 by 182 pixels.

Customise the following language strings, to alter the embedded export information:
'publishername' - set the PDF 'publisher' field
'printed' - set the description on the front page 'This doucment was downloaded on [date]'

(see https://docs.moodle.org/en/Language_customization for more details)

# Contact

Any enquiries, including custom Moodle development requests, should be sent to info@synergy-learning.com

### Contributors

• Tue, 25 Nov 2014, 9:48 PM
Thanks Davo for letting me know about the runway free for landing this. Welcome back to the Plugins directory!
• Tue, 10 Nov 2015, 9:59 PM
Hi, does this plugin still modify the core tables ? Thanks
• Tue, 10 Nov 2015, 10:03 PM
Francis, no it does not.
• Fri, 11 Mar 2016, 4:50 AM
WIth moodle 3.0.1 i receive the following error message:

Notice: Undefined property: moodle_page::$settingsnav in /var/www/lms.alte-kanti-aarau.ch/moodle/local/wikiexport/lib.php on line 491 Fatal error: Call to a member function get() on a non-object in /var/www/lms.alte-kanti-aarau.ch/moodle/local/wikiexport/lib.php on line 492 and later on as I tried some changes: local plugin navigation callback: Please rename 'local_wikiexport_extends_navigation' to 'local_wikiexport_extend_navigation'. Support for the old callback will be dropped in Moodle 3.1 * line 1308 of /lib/navigationlib.php: call to debugging() * line 3426 of /lib/navigationlib.php: call to global_navigation->initialise() * line 718 of /lib/pagelib.php: call to settings_navigation->__construct() * line 768 of /lib/pagelib.php: call to moodle_page->magic_get_settingsnav() * line 6865 of /lib/adminlib.php: call to moodle_page->__get() * line 847 of /admin/index.php: call to admin_externalpage_setup() • Fri, 11 Mar 2016, 5:06 AM error with the newest verstion on github Notice: Undefined property: moodle_page::$settingsnav in /var/www/lms.alte-kanti-aarau.ch/moodle/local/wikiexport/lib.php on line 495 Fatal error: Call to a member function get() on a non-object in /var/www/lms.alte-kanti-aarau.ch/moodle/local/wikiexport/lib.php on line 496
• Sat, 29 Oct 2016, 1:11 PM
I'm trying to export a WiKi in Chinese, but the characters always display as ? marks. Does anybody know how to get Chinese characters to show up in the PDF?
• Sat, 29 Oct 2016, 3:14 PM
I've not tested, but I assume it is related to the font used to do the export not having any suitable characters in it. If you look in the code, you should be able to switch to using a different font (I don't have the code in front of me now, but if you search for 'setfont' you should find it - the available fonts are in lib/tcpdf/font, again, off the top of my head, without being able to check right now).
• Sat, 29 Oct 2016, 10:02 PM
Thank Davo for the suggestion of switching to a different font. I have followed the instructions given by Ciao in https://moodle.org/mod/forum/discuss.php?d=237702 to install a new font into the folder: my_moodle_path/lib/tcpdf/fonts. I also changed the font name of 'FreeSerif' to 'DroidSansFallback' in Line 73 of my_moodle_path\lib\pdflib.php. Chinese characters show perfectly now. Thanks!
• Tue, 7 Feb 2017, 12:36 AM
Thanks for this great plugin. Any previews for the moodle 3.2 version?
• Tue, 7 Feb 2017, 12:40 AM
Hi Amaia - it's not quite clear what you're asking for. I've not developed a specific Moodle 3.2 version of this plugin (so there's nothing to offer previews of). At a guess, there is probably no reason not to use the 3.1 version, but I've not done any formal testing to find out.
• Thu, 1 Jun 2017, 6:47 PM
Dear Davo,

thank you for providing this plugin which is very helpful in online teaching. At the moment we are facing a technical problem with one wiki which cannot be solved by our local development team. The wiki shows the following error when trying to export a pdf with the plugin. "Fehler: TCPDF ERROR: Empty font family". Have you heard about this before and could give us a hint where to look at? The error cannot be reproduced in a freshly opened wiki activity so I assume it is to with some content, formatting mistakes?

Wiebke