Your Moodle version

Assignment submissions : PDF submission

assignsubmission_pdf
Maintained by Davo Davo Smith
This allows a teacher to annotate and return PDF files that have been submitted by students. Teachers can add and position comments and draw lines, ovals, stamps, rectangles and highlights onto the student's work, from within the browser.

Sets

This plugin is part of set Assignment: PDF.

These plugins for the assignment module allows a teacher to annotate and return PDF files that have been submitted by students. It is based on my previous 'UploadPDF' assignment type, updated to work with the Moodle 2.3+ 'assign' module (rather than the Moodle 2.0-2.2 'assignment' module).

Teachers can add and position comments and draw lines, ovals, stamps, rectangles and highlights onto the student's work, from within the browser, before returning the work to the student.

This plugin is available in Moodle 2.3+, Moodle 2.0-2.2 and Moodle 1.9 versions.
This is the Moodle 2.3+ version - you can download the Moodle 1.9 version from here:
https://github.com/davosmith/moodle-uploadpdf/zipball/MOODLE_19_STABLE
and the Moodle 2.0-2.2 version here:
https://github.com/davosmith/moodle-uploadpdf/zipball/master

!! THERE ARE A FEW IMPORTANT ITEMS TO NOTE IN THE INSTALLATION, PLEASE READ CAREFULLY !!

Installation

Note - the assignsubmission_pdf plugin can, theoretically, be used without the assignfeedback_pdf plugin (https://moodle.org/plugins/view.php?plugin=assignfeedback_pdf). On its own, however, it has little advantage over the standard 'file' submission plugin (other than coversheet handling). The assignfeedback_pdf will not do anything on its own (and cannot be installed without the submission plugin).

  1. Download and install GhostScript ( http://www.ghostscript.com/ ) - or install from standard respositories, if using Linux.
    Under Windows, do not install to a path with a space in it - that means you should install to something like 'c:\gs' NOT 'c:\Program Files\gs' (note you only need the files 'gswin32c.exe' and the dll file from the 'bin' folder, all other files are unnecessary for this to work).
  2. Unzip the submission pdf and feedback pdf plugin files to folders on your local machine
  3. Upload the plugin files to <siteroot>/mod/assign/submission/pdf and <siteroot>/mod/assign/feedback/pdf
  4. Log in to Moodle as administrator, then click on 'Home'.
  5. Visit 'Site admin > Plugins > Assignment plugins > Feedback Plugins > PDF Feedback'. Adjust the 'Ghostscript path' to where ghostscript is installed (should not need changing on a Linux install).

All being well, you should now be able to add submission and feedback type 'pdf' to assignments.

How to use

  • Add a new Assignment to a course.
  • Configure all the usual settings - you should be aware of the following additions:
    • PDF submission - set to 'Yes' to allow students to submit PDFs for annotation
    • PDF feedback - set to 'Yes' to allow the submitted PDFs to be annotated (note this ONLY works with PDFs submitted via the 'PDF submission' plugin).
    • Coversheet - this is a PDF that will be automatically added to the start of any files submitted by your students
    • Template - before submission your students can be (optionally) asked to fill in some text fields, the template is used to add these entries to the coversheet (this is ignored, if no coversheet is selected).
    • Edit Templates... - see section below

It is recommended this is used with the 'Require students click submit button' option, as then the processing and combining of the submission PDFs is only done once they click that button. Otherwise, the processing is done every time the student updates their submission.

  • When a student uploads their files and clicks 'Submit' they will be combined them together into a single submission (along with the coversheet).

(Hint: to help students generate PDF files, install a PDF printer, such as PDF Creator - http://sourceforge.net/projects/pdfcreator ).

  •  The teacher can then log in, go to the usual marking screen and click on 'Annotate submission', which will bring up the first page of the student's work on screen.
  • Click anywhere on the image of the PDF to add a comment. Use the resize handle in the bottom-right corner of a comment to resize it, click & drag on a comment to move it. Click (without dragging) on a comment to edit it, delete all the text in a comment to remove it.
  • Right-click on a comment to add it to a 'Comment Quicklist'. You can then right-click anywhere on a page to insert comments from this 'Comment Quicklist' (with the same text, width and background as the original). Comments can be deleted from the 'Comment Quicklist' by clicking on the 'X' to the right of the comment.
  • You can add lines to the PDF by holding 'Ctrl' ('Alt' on Apple Macs) whilst you click and drag with the mouse (or alternatively hold 'Ctrl' then click once for the start and once for the end of the line).
  • You can also choose different drawing tools by clicking on the icons or by using the keys c (comments), l (lines), r (rectangles), o (ovals), f (freehand lines), e (erase lines), [ & ] (change comment colour), { & } (change line colour)
  • Navigate between the pages by clicking on the 'Next' and 'Prev' buttons or by pressing 'n' and 'p' on the keyboard.
  • Click on 'Save Draft and Close' (or just navigate to a different page) to save the work in progress.
  • Click on the 'Generate Response' icon to create a new PDF with all your annotations present (that the student will be able to access).
  • You can view the comments you have made on a student's previous submissions by choosing that submission from the 'compare to' list
  • You can quickly find comments you have previously made by clicking on the 'find comment' list.
  • Add any feedback / grades to the usual form and save them.

Edit Templates

  • Click on the 'Edit Templates...' link on the 'Settings' page
  • Choose the name of the Template to edit (or select 'New Template...')
  • You can change the name of the template, delete the template or make it available to everyone on the site (administrators only, for this last option). Only administrators can edit site templates.
    Note: you cannot delete templates that are in use (click 'show' to find out where it is currently being used)
  • The list at the bottom allows you to choose an item in the template to edit, or choose 'New Item...' to add a new one.
  • The types of item you can add are:
    • text - a block of text, which will re-flow at 'width' pixels, 'value' will be the prompt the student sees to fill this in
    • shorttext - similar to text, but without word-wrapping useful for 'name' or 'type your initials to state this is all your own work'
    • date - fills in the date that the assignment was submitted, 'value' is the format to record the date
  • To position the items on the template, upload an example PDF coversheet (using the bottom form) then type in the position you want to place the PDF (x position, y position, in pixels).
    Alternatively, click on the coversheet image to set the position of that template item.
  • When you are finished, save any items you have changed, then close the window. The list of templates on the 'settings' page should have been updated.

Known issues

There is no way to annotate the PDFs without JavaScript.

Backup & restore will not transfer coversheet templates to a different site (it will work fine on a single site). This is a limitation of the assignment backup & restore process.

Thanks

This makes use of GhostScript and the FPDI and TCPDF libraries for PDF manipulation; Mootools is used to help with the JavaScript and Raphael provides the cross-browser annotation support.

Thanks to the creators of all those libraries, as this wouldn't have been possible without their hard work (and their free software licensing)

Screenshots

Screenshot
Screenshot

Contributors

Davo
Davo Smith (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Nadeem Mo
    Thu, Jan 9, 2014, 2:32 PM
    I'm having a problem with the PDF Submission plugin for 2.6. Everytime when i'm creating an assignment it become disable. Student can't submit pdf assighment. URGENT.
  • Davo
    Thu, Jan 9, 2014, 3:42 PM
    Nadeem - is it this plugin, or is it the PDF annotation plugin that is part of Moodle 2.6?

    Either way, what happens when you go to the admin settings page for the plugin and click on the 'test ghostscript path' button?
  • Picture of Cian Scanlon
    Tue, Jan 14, 2014, 7:07 PM
    Hi Davo, i'm brand new to Moodle development and am actually doing a project for college. I need to be able to do submissions and feedback, but on java files. Do you think you could point me in the right direction of how to go about this? Perhaps even looking at your code may help do you think?
  • Picture of Cameron Collins
    Mon, Mar 24, 2014, 10:08 AM
    Hello Davo, Im loving the idea of this Plug-in but sadly each time I go to annotate a submission I get a error like so ---

    Unable to generate image - details: Command:[dataroot]\gs9.10\bin\gswin32c.exe -q -sDEVICE=png16m -dSAFER -dBATCH -dNOPAUSE -r100 -dFirstPage=1 -dLastPage=1 -dGraphicsAlphaBits=4 -dTextAlphaBits=4 -sOutputFile="[tempdir]/assignfeedback_pdf/2d993cecde990a12717e863ae4a6c3cef675fe6c/img/image_page1.png" "[tempdir]/assignfeedback_pdf/2d993cecde990a12717e863ae4a6c3cef675fe6c/sub/submission.pdf" 2>&1
    Result:

    Im noticing people with similar problems but what hoping yourself or someone else could shead some light on this situation.

    Thanking you greatly,


  • Davo
    Mon, Mar 24, 2014, 4:25 PM
    [dataroot]\gs9.10\bin\gswin32c.exe is not a valid path - if you copy + paste that line onto the command line on your server, I would expect you to get an error message.

    Please make sure you have put in the correct path to where ghostscript has been installed and that your server is configured to allow PHP to execute external programs installed in that location.
  • Picture of Cameron Collins
    Tue, Mar 25, 2014, 12:04 PM
    Thanks for the quick response, I fixed the GS path but of course im still recieving a similar error, So I turned the Debugging mode on in moodle and this is what it came back with ---
    Debug info:
    Error code: errorgenerateimage
    Stack trace:
    •line 456 of \mod\assign\feedback\pdf\mypdflib.php: moodle_exception thrown
    •line 1046 of \mod\assign\feedback\pdf\locallib.php: call to AssignPDFLib->get_image()
    •line 552 of \mod\assign\feedback\pdf\locallib.php: call to assign_feedback_pdf->get_page_image()
    •line 68 of \mod\assign\feedback\pdf\editcomment.php: call to assign_feedback_pdf->edit_comment_page()
  • Davo
    Tue, Mar 25, 2014, 4:31 PM
    I'm afraid that stack trace doesn't help - it just points to the only place that error could come from. There isn't really anything I can suggest from the Moodle side of things. The original error message shows exactly what command-line command was being issued - if it doesn't work then it is down to a server configuration issue, either:
    * The ghostscript executable is not found in that location
    * PHP has the 'exec' command disabled, for security reasons
    * PHP does not have permission to execute that particular program (I believe this can be an issue on some Windows servers - I only have experience with Linux servers, so I can't really comment)

    I don't know what else to suggest.
  • Picture of Cameron Collins
    Wed, Mar 26, 2014, 6:33 AM
    I'll have to look into some of the permission side of things more i'd say, because im pretty confident that the path is correct.

    Thanking you once again hopefully i'll be able to hit the nail on the head today smile
  • Picture of Nick Varney
    Wed, Apr 2, 2014, 5:36 PM
    I can't seem to find the dll file needed for the Windows 64 version. I am looking at the 9.14 Ghostscript download page http://www.ghostscript.com/download/gsdnld.html and it only provides the exe file. What am I doing wrong? smile
  • Davo
    Wed, Apr 2, 2014, 5:40 PM
    Is that not the installer for ghostscript? (I can't check, as I'm running a Linux box here) I would assume that once you've run the installer, the command-line application (and the supporting dll) would be available on your system.
  • Picture of Nick Varney
    Wed, Apr 2, 2014, 6:41 PM
    Yes, you're quite right. Thanks Davo
  • Carol walking in the Howgills
    Thu, Jun 19, 2014, 6:09 PM
    Hi Davo
    I love this module, thanks very much! In the process of upgrading my server, I uninstalled it and now I'm having trouble re-installing (Moodle 2.5). I put the folders in the right place on my server and logged in to moodle as admin but didn't get the usual install prompt for a new plugin. When I add an assignment to a course the PDF options just don't appear. I guess I'm stuck half-installed because the PDF assignment submission and feedback modules appear in my plugins overview but there's no uninstall link. Since this is my test server and I don't mind if I break it, I tried removing all the database tables referring to PDF submission and feedback but the situation is the same.
    Any words of wisdom?
    thanks!
    Carol
  • Davo
    Thu, Jun 19, 2014, 6:21 PM
    Carol - try removing the entries in mdl_config_plugins, with plugin = assignfeedback_pdf or assignsubmission_pdf. You might also need to check if an upgrade is running (look in mdl_config for name = 'upgraderunning') or clear the 'allversionhash' value in mdl_config.

    Purging all caches (under Site admin > developer > purge all caches) may also help.
  • Carol walking in the Howgills
    Thu, Jun 19, 2014, 10:32 PM
    marvellous, thanks! removing the entries from mdl_config_plugins removed the modules from the plugins overview and purging the caches caused Moodle to recognise the new files were there for installing the modules. Thanks smile
  • Carol walking in the Howgills
    Thu, Jun 19, 2014, 11:15 PM
    I think I managed to replicate how I got into that situation... tried to install another assignment type (onlineaudio) at the same time as assignment type PDF - only online audio was apparently detected for installation but maybe PDF partially installed itself?
1 2 3 4
Please login to post comments