General plugins (Local): Lesson export

local_lessonexport
Maintained by Picture of Adam King Adam King
This plugin allows lesson modules to be exported to optionally protected PDF documents or EPUB format.
11 sites
292 downloads
13 fans

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

There are globally configurable settings available to give the PDF documents all of the standard supported protection, although EPUB does not have any protection; for this I have offered another branch of the plugin on Github for exporting only PDF documents. 

It is possible to pass the PDF export a font-family to apply to the exported content, however this does not yet apply to EPUB documents, which have a custom css textarea available for manipulating the style. EPUB documents with custom css may not appear as intended in all readers so make sure you test what you are able to set here.

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 Adam King
    Wed, 1 Mar 2017, 6:12 PM
    Definitely! Thanks for the spot, I'll have a release for you in under 20 minutes.
  • Picture of Adam King
    Wed, 1 Mar 2017, 6:38 PM
    Should be fixed Dinis. Please consider posting issues to Github if possible but do tell me how it goes!
  • Picture of Sean Ford
    Wed, 1 Mar 2017, 11:19 PM
    Thank you for this!! One thing: the word wrapping is a bit off, seeming to place paragraph marks after the first word of each paragraph. Is this a setting on my end?
  • Picture of Dinis Medeiros
    Thu, 2 Mar 2017, 2:16 AM
    Adam, working ok. Translated and using. Thanks
  • Picture of Adam King
    Thu, 2 Mar 2017, 3:08 AM
    Not a problem Dinis!

    Sean, I've been working on features for the time being but it uses Moodle's internal PDF library (TCPDF). I'll have a look into making it's presentation a little better soon although I imagine there'll never be a perfect balance. What we're looking to do with our existing content, for the time being, is tweaking it to better suit the library. There's many ways to approach wrapping the content better and spacing although each one I foresee as having bad side-effects too! Nothing will ever compare to making a PDF personally (either with LaTeX or any PDF editor) but I will get it as close as possible if I can. Any contributions to the repository are also welcome for anyone who has a clear plan for that already.
  • 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!
1 2
Please login to post comments