PDF submission

Assignment submissions ::: assignsubmission_pdf
Maintained by DavoDavo Smith
Part of set Assignment: PDF.
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.
Latest release:
634 sites
250 downloads
31 fans
Current versions available: 4

This plugin and the associated feedback plugin, do still, technically, work with Moodle 3.1, but they sit very awkwardly alongside the new grading layout. If you haven't switched over yet, now is the time to do so.

Important note - PDF annotation (based on the PDF feedback part of this plugin) is now part of Moodle core (from Moodle 2.6 onwards). 

There is currently no code available to migrate existing assignments using my plugin to the core version. However, I would recommend that all future assignments are created using the core Moodle functionality - I do not intend to maintain this version indefinitely (although I will attempt to fix any major compatibility bugs that arise in future versions).

Note also that there are a number of significant differences between the plugin version and the Moodle 2.6 built-in version of PDF annotation. The documentation below is only relevant to the plugin version; questions or problems about the built-in version should be directed to the Moodle forums or tracker.moodle.org


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 #0
Screenshot #1

Contributors

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

Comments RSS

Comments

  • Chi-Un Lei
    Thu, 16 May 2013, 11:28 AM
    Dear Davo,

    Thanks for your previous response. It works well.

    My colleagues would like to mark assignments via tablets. However, drag-and-drop operations had been replaced by zoom-in/-out operations in tablets. Therefore, they cannot use drawing tools to draw nice figures or write equations. Have you faced any similar difficulties before? And, are there any solutions to this problem?

    Thanks.
  • Davo
    Thu, 16 May 2013, 3:00 PM
    Chi-Un Lei - I have experimented with adding touch support to my plugin. Unfortunately the only touch device I have is my phone and that had a major problem with annotation - if you scrolled to the middle of the page, it was not possible to scroll any more, as any attempt to move resulted in a line being drawn. Until I have access to a more suitable device (and some spare time to work on this), I won't be able to add touch support.
  • Simon Carter
    Sun, 19 May 2013, 6:52 AM
    I am very much looking forward to using this with my staff. It's potentially a killer plug-in! (in a good way). We set it up this week and everything works EXCEPT I cannot see the document I am annotating until after it is sent back to the student. The window is blank. The annotation tools work fine, just no document appearing. If I submit a two page document, it knows there are two pages, etc. After returning to the student, the annotation is on the original document.

    The only think I am doing that is in any way "unusual" is that the student I am testing on is myself "Teacher" but with my role changed to that of a Student.

    Has anyone else experienced a similar problem with the annotation window not showing the document being annotated?

    Thanks
  • Davo
    Sun, 19 May 2013, 10:58 PM
    Simon: just to be clear, when you open up the document for annotation, you can see a big, white space, where the document should be, which you can annotate, but where the document itself doesn't appear?

    I could do with a bit more information in order to help you out with this. What version of Moodle are you using? What server are you using (windows / linux / mac? IIS / apache?) What browsers have you tried? Have you got the latest version of the plugin (both submission and feedback)? Does the test on the global settings page work? Do you get any errors in the firefox javascript console, or in the Chrome developer tools?
    What theme are you using? Does switching to 'standard' theme solve the problem?

    If none of the above help, could you use 'view source' (or 'inspect element') on the page, search for 'pdfimg' (without the quotes) and look for the 'src' attribute of the 'img' tag that is there - it should look something like: [moodlesite]/pluginfile.php/195/assignfeedback_pdf/feedback_pdf_image/18/1/page3.png?ts=1364372132

    If you copy & paste this address into the browser address bar, does the image of the document appear?

    Does it work with PDFs generated by a different source (e.g. does it work if you use http://sourceforge.net/projects/pdfcreator/ to generate the PDF for annotation)?
  • Simon Carter
    Mon, 20 May 2013, 7:40 PM
    Thanks for the swift reply Davo.

    Your description of our symptoms is correct. The strange part is that the "white space" does recognise the number of pages in the pdf document I am trying to annotate correctly.

    Site URL http://vle.jis.edu.bn
    Moodle version 2012120303
    Moodle release 2.4.3 (Build: 20130318)

    Server is Apache
    Browsers tried: Chrome (PC), Firefox (PC) and Safari (Mac)
    We do NOT have the latest version installed - we have the January 2013 release (The administrators are updating this hopefully tonight)
    I am not sure where the Global Settings page is, so i have not tried the test. I have an administrator account, but our site is currently run by a third party (WebAnywhere)
    The Theme we are using is a customised version of SimpleSpace. I changed to a standard theme, but there was no effect.

    I have viewed the source and attempted to open the pdf file in the browser using the path. The same thing happens. I cannot view it, but the mouse pointer behaves as if it is there, and of the correct length.

    pdfs made in the same way (an MS Office plug-in (it might even already BE pdfcreator from sourceforge), but i am not sure which one) will display in the browser correctly from "file://" but not from "http://"

    Our admin people should be updating the plugins tonight. Personally, I am suspecting some tweak in ghostwriter. As far as Javascript/Ajax, settings etc in the browser, testing from home on two different platforms (Mac and Windows) yields the same results, so I am not thinking it is anything in our site's browser security configurations. Will update you tomorrow when I have tested the updated plugins.

    Many thanks
    Simon

  • Davo
    Mon, 20 May 2013, 7:44 PM
    The global settings page is, as with all global settings pages for addons, found in the 'Admin/Settings' block:
    Site admin > Plugins > Assignment plugins > Feedback plugins > PDF feedback
    Then click on 'Test ghostscript path'.
  • Simon Carter
    Mon, 20 May 2013, 8:16 PM
    Hmmmm For the Feedback plugins, PDF Feedback does not appear. When I check the Mange Assignment Feedback Plugins option, I can see it, but there are no settings available.

    Maybe the feedback plug-in needs reinstalling.

  • Davo
    Mon, 20 May 2013, 8:30 PM
    The settings page for the feedback plugin is a recent addition - part of the reorganising I've started to do on the code.
  • Simon Carter
    Thu, 23 May 2013, 12:23 AM
    Ok - I have corrected the Ghostwriter path, and the test reports it is working as expected.

    We have installed the latest versions of the plugins.

    I still cannot see the pdf contents in the window.

    When the document is longer than a single page, it correctly shows the number of pages - but the Back and Next buttons do not work. (Is that a clue?)

    I have tried various methods of creating pdfs. All produce the same results.

    I have tested it from inside our school network and from home.

    I have tested it on Mac and Windows.

    I have tested it in Safari and Firefox (Mac) Chrome and Firefox (PC)

    Since the upgrade to the latest versions of the plugins, the annotation menu does not render properly, except in Mac Safari. Instead of a horizontal set of icons, I have them vertical. Again - is this a clue? Is there something wrong in the Javascript or Ajax settings? I have ensured that both are enabled in the Global Settings.

    I am running out of ideas.

    I can't think of any other parameters to change.

    sad
  • Davo
    Thu, 23 May 2013, 12:45 AM
    Are there any javascript errors? (Chrome developer tools / Firefox javascript console)
  • Simon Carter
    Thu, 23 May 2013, 1:00 AM
    In Safari I get a lot of errors of the same type reported:


    Resource interpreted as Image but transferred with MIME type image/svg+xml.
  • Davo
    Thu, 23 May 2013, 1:02 AM
    That is a warning not an error - if the icons are not across the top of the screen correctly, then the javascript has failed (although you wouldn't be able to annotate the page either in that case).

    Can you please try clearing your browser cache and trying again, just in case you are loading some old javascript code?
  • Simon Carter
    Thu, 23 May 2013, 1:09 AM
    OK Browser cache cleared in Safari and Firefox (Mac).

    Menus are now rendering correctly.

    No Javascript errors reported in either - just some warnings.

    PDF files still not showing.

    Annotation tools work ok.
  • Davo
    Thu, 23 May 2013, 2:56 AM
    This would be easier to continue via email - moodle AT davosmith.co.uk
    Please could you include a screenshot that shows what the problem you are having is.
  • Monjur Morshed Bappy
    Sun, 16 June 2013, 3:20 PM
    Hi, I install both of PDF Submission and PDF Plugin. When I click Test ghostscript path, it says Internal Server Error.
    any kind of help is appreciated.
Please login to post comments