General plugins (Local): Lesson PDF Export

local_lessonexport
Maintained by Picture of Adam King Adam King
This plugin allows lesson modules to be exported to PDF documents with optional protection.
69 sites
480 downloads
20 fans

This plugin visually displays the option to output lesson modules as PDF documents.

There are many settings that come with the PDF export plugin including custom font, footer texts, document protection, cover colours, password protection, strict exporting and more. 

Document pages are ordered the same as each lesson and question pages are also supported, although some answers are not shown (such as short answer questions).

This plugin was developed for use on the SHEilds eLearning platform. If this plugin does not match your use-case, please open a ticket on Github detailing what you require for this to become a useful addition to your Moodle plugins.

Screenshots

Screenshot #0
Screenshot #1
Screenshot #2
Screenshot #3

Contributors

Picture of Adam King
Adam King (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Sean Ford
    Thu, 2 Mar 2017, 5:02 AM
    Thank you, Adam!
  • Picture of Dinis Medeiros
    Wed, 15 Mar 2017, 1:01 AM
    TCPDF ERROR: Empty font family
    line 2927 of /lib/tcpdf/tcpdf.php: Exception thrown
    line 4182 of /lib/tcpdf/tcpdf.php: call to TCPDF->Error()
    line 4589 of /lib/tcpdf/tcpdf.php: call to TCPDF->AddFont()
    line 17121 of /lib/tcpdf/tcpdf.php: call to TCPDF->getFontAscent()
    line 871 of /local/lessonexport/lib.php: call to TCPDF->writeHTML()
    line 18891 of /lib/tcpdf/tcpdf.php: call to lessonexport_pdf->image()
    line 1027 of /local/lessonexport/lib.php: call to TCPDF->openHTMLTagHandler()
    line 18278 of /lib/tcpdf/tcpdf.php: call to lessonexport_pdf->openhtmltaghandler()
    line 407 of /local/lessonexport/lib.php: call to TCPDF->writeHTML()
    line 109 of /local/lessonexport/lib.php: call to local_lessonexport->export_page()
    line 43 of /local/lessonexport/export.php: call to local_lessonexport->export()
  • Picture of Adam King
    Wed, 15 Mar 2017, 1:28 AM
    Thanks for the message, I've started up an issue on github to track it and shall address it shortly! https://github.com/SHEilds/moodle-local_lessonexport/issues/8
  • Picture of stéphane Rolland
    Wed, 15 Mar 2017, 5:36 AM
    I have a problem :
    this message appair when i want to see a lesson :

    Notice: Undefined property: moodle_page::$settingsnav in /home/portailj/public_html/moodlejm/local/lessonexport/lib.php on line 627

    Fatal error: Call to a member function get() on a non-object in /home/portailj/public_html/moodlejm/local/lessonexport/lib.php on line 628

    Can you help me ?
    thanks
  • Picture of Adam King
    Wed, 15 Mar 2017, 5:12 PM
    Hey Stéphane, I'm working on both issues at the moment and shall have a fix for both of them today! Apologies for any inconvenience, these issues weren't experienced whilst developing the plugin.
  • Picture of Adam King
    Wed, 15 Mar 2017, 8:09 PM
    I've fired up Github issues for both of these issues however it would be useful to get some more information;

    What version of Moodle are you using?
    What version of the plugin are you using?
    How did you install the plugin?
    Have you tested it with simpler content?
    Do you have a custom theme?

    Any additional settings or content is a bonus, but I cannot reproduce this error.
  • Picture of stéphane Rolland
    Thu, 16 Mar 2017, 7:54 AM
    Hey,
    moodle version 3.1.3+ (Build: 20161202)
    theme "essential" 3.1.1.4 (Build: 2016061713)
    install with "Install plugins from the moodle plugins directory"
    yesterday, i could not open my lesson on edition mode ! but today it's good !!!! I dont no why, i uninstalled and reinstalled it
    but i want to know What is the manipulation to export in pdf
    thanks
  • Picture of stéphane Rolland
    Thu, 16 Mar 2017, 7:54 AM
    Hey,
    moodle version 3.1.3+ (Build: 20161202)
    theme "essential" 3.1.1.4 (Build: 2016061713)
    install with "Install plugins from the moodle Plugins directory"
    yesterday, i could not open my lesson on edition mode ! but today it's good !!!! I dont no why, i uninstalled and reinstalled it
    but i want to know What is the manipulation to export in pdf
    thanks
  • Picture of Pranay Kumar
    Fri, 24 Mar 2017, 6:08 AM
    Hi, will there be a support for version 3.2?
  • Picture of Adam King
    Fri, 24 Mar 2017, 10:34 PM
    I've no reason to believe why this wouldn't work on Moodle 3.2 but I've just not tested it yet, if you have an instance and are willing to do so before I manage to get around to it then I'd be thrilled to see the result. I'm more than happy to make changes for 3.2 support though!
  • Picture of Adam King
    Thu, 30 Mar 2017, 9:51 PM
    Latest release should solve the $settingsnav issue as well as a better regex for finding elements with the class "pagebreak". Please don't put content in the elements with the pagebreak class as regular expressions are not useful for parsing HTML (it's an irregular language). I had issues whilst using the DOMDocumentFragment to manipulate pagebreaks but I will make a better effort to improve breaking in the future!
  • Picture of Ladislav Pliska
    Mon, 17 Apr 2017, 2:34 AM
    Hey,
    I have a problem with special (national) characters in pdf exports, but in epub format is OK. Charset is UTF-8, czech language. In pdf file, there's symbol ? instead of the local letters ř, č or š.

    Can you help me ?
    Thanks
  • Picture of Ramzi Jildeh
    Wed, 19 Apr 2017, 4:19 PM
    Hi,
    i am working with Arabic lessons , when i want to export the lesson, i get it all ????? , i tried different fonts , but did not work out, is there a way to fix it or add Arabic fonts to use in the Plugins?
    Thanks.
  • Picture of Jose Luis Martin Jimenez
    Wed, 19 Apr 2017, 8:16 PM
    Hello, Adam.
    About the $settingsnav issue, I think it's related to the configuration of "Navigation block".
    You can read my contribution in the Github forum thread about this issue.

    Thanks
  • Picture of Adam King
    Tue, 25 Apr 2017, 4:35 PM
    Hey, thanks for the heads-up! I believe that issue is now fixed. As for other languages; I've added a right-to-left optional feature and the "?" issue is a font issue. Using "freeserif" as a font-face works, but I'm working on allowing you to upload your own fonts to be used for the next release.
1 2
Please login to post comments