PDF feedback

Assignment feedbacks ::: assignfeedback_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. For Moodle 2.6 and above, I advise you use the standard functionality instead.
Latest release:
597 sites
86 downloads
18 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.

This is part of the PDF annotation plugin for Moodle assignments.

Full instructions and information can be found in the submission part of this assignment plugin at:
https://moodle.org/plugins/view.php?plugin=assignsubmission_pdf
OR
https://github.com/davosmith/moodle-assignsubmission_pdf

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

  • Davo
    Sun, 3 Mar 2013, 9:29 PM
    According to the output the ghostscript path (in 'site admin > plugins > assignment feedback > pdf', off the top of my head) is blank. Please update this to the correct location for your system (see the instructions included in the readme.txt file for more details).
  • Hartwig Hitz
    Sun, 3 Mar 2013, 10:27 PM
    Thank you, it was the "gs" - I thought, I can leave it blank...
  • J Stringer
    Tue, 12 Mar 2013, 9:15 PM
    Hi Davo,

    I've installed your plugin but I'm having some issues with ghostscript. I get the error:

    Unable to generate image - details: Command:/usr/local/share/ghostscript/8.71/ -q -sDEVICE=png16m -dSAFER -dBATCH -dNOPAUSE -r100 -dFirstPage=1 -dLastPage=1 -dGraphicsAlphaBits=4 -dTextAlphaBits=4 -sOutputFile="/Applications/MAMP/data/moodle23/temp/assignfeedback_pdf/cc269cf558b7751034008c73f55ecc3ff4209cdd/img/image_page1.png" "/Applications/MAMP/data/moodle23/temp/assignfeedback_pdf/cc269cf558b7751034008c73f55ecc3ff4209cdd/sub/submission.pdf" 2>&1
    Result:sh: /usr/local/share/ghostscript/8.71/: is a directory

    I'm not sure what to put for the path. We're running Mac OS X Lion on our server. Ghostscript has been installed to /usr/local/share/ghostscript/8.71. However, I'm not sure where I should point the plugin. I read somewhere that for windows you point it at the folder that contains gswin32c.exe. Do you know if there's an equivalent on a Mac? thanks! really looking forward to getting this to work!
  • Davo
    Tue, 12 Mar 2013, 9:21 PM
    I do not know what the ghostscript application is called on Mac.
    In linux, the application is called 'gs', so the full path to it would usually be:
    /usr/bin/gs

    Under windows it is called gswin32c.exe, so the full path will be something like:
    c:\gs\bin\gswin32c.exe

    You need to make sure you include the name of the ghostscript executable in the path, otherwise my code doesn't know what application to run. Try looking in the installation directory to see what is in there.
  • J Stringer
    Tue, 12 Mar 2013, 10:11 PM
    Hi Davo,

    Thanks for the quick response. I found the path, it's /usr/local/bin/gs. However, now it's giving me a new error:

    Unable to generate image - details: Command:/usr/local/bin/gs -q -sDEVICE=png16m -dSAFER -dBATCH -dNOPAUSE -r100 -dFirstPage=1 -
    dLastPage=1 -dGraphicsAlphaBits=4 -dTextAlphaBits=4 -
    sOutputFile="/Applications/MAMP/data/moodle23/temp/assignfeedback_pdf/b49f17770402a698f61964a1db139b2a5b023d6a/img/image_page1.png"
    "/Applications/MAMP/data/moodle23/temp/assignfeedback_pdf/b49f17770402a698f61964a1db139b2a5b023d6a/sub/submission.pdf" 2>&1
    Result: in /usr/lib/libcups.2.dylib

    I feel like I'm getting closer though smile
  • Davo
    Tue, 12 Mar 2013, 10:22 PM
    I suggest you try and run the above command via the command line and check the error message it gives (you may find that the temporary files have been cleaned up, in which case, copy the PDF to another location and adjust the command line to point at the correct location).

    It looks like ghostscript is giving an error when trying to generate an image from the PDF you have uploaded. If that is the case, then there's not a lot I can do about it - you may want to make sure you have the latest version of ghostscript and then report a bug to the developers.
  • J Stringer
    Wed, 13 Mar 2013, 11:57 AM
    Hi Davo,

    I was able to use ghostscript to generate the image directly from the PDF. I'm thinking it has something to do with two different versions of libcups.2.dylib. One in the lib folder, one in the MAMP folder. The other possibility is that by default the Mac gs file is a shortcut to gs-x11. There's another version gs-nox11. I'd like to try that, but now I'm getting a new error when I try to create an assignment:

    Strict Standards: Declaration of assign_submission_pdf::get_files() should be compatible with assign_plugin::get_files(stdClass $submissionorgrade) in /Applications/MAMP/htdocs/moodle23/mod/assign/submission/pdf/locallib.php on line 789

    Do you know what might be causing this? Thanks again for your help. I'm a newbie at Moodle.
  • Davo
    Wed, 13 Mar 2013, 4:14 PM
    The function definition for assign_plugin::get_files() changed between Moodle 2.3 and Moodle 2.4. However, this shouldn't really matter - either ignore the message, turn off debugging or upgrade to Moodle 2.4.
  • J Stringer
    Tue, 16 Apr 2013, 12:31 PM
    Hi Davo,

    I have recently gotten back to setting up our Moodle server and I'm still getting the same errors for PDF Feedback. When I run the command directly on the server it works "/usr/local/bin/gs-X11 -q -sDEVICE=png16m -dSAFER -dBATCH -dNOPAUSE -r100 -dFirstPage=1 -dLastPage=1 -dGraphicsAlphaBits=4 -dTextAlphaBits=4 -sOutputFile="/Applications/MAMP/data/moodle23/temp/assignfeedback_pdf/517e3a15ed98f10c079c7f0873e7c8656a57dbe1/img/image_page1.png" "/Applications/MAMP/data/moodle23/temp/assignfeedback_pdf/517e3a15ed98f10c079c7f0873e7c8656a57dbe1/sub/submission.pdf" 2>&1".


    The png file is generated and saved in "/Applications/MAMP/data/moodle23/temp/assignfeedback_pdf/517e3a15ed98f10c079c7f0873e7c8656a57dbe1/img/"

    When I try through Moodle I get the message "Unable to generate image" "Result: in /usr/lib/libcups.2.dylib". Do you this may have something to do with permissions?

    Thanks again,

    John
  • Davo
    Tue, 16 Apr 2013, 3:19 PM
    I guess it will have something to do with permissions. I have no idea what though. If the command works properly when copied & pasted into the command line and the identical command fails to work when called via PHP, then there must be a problem with your web server configuration or the permissions.
  • J Stringer
    Tue, 16 Apr 2013, 3:32 PM
    Hi Davo,

    It had something to do with two different versions of the libcups.2.dylib file. One in the MAMP folder the other in the usr folder with GS. I've temporarily replaced the usr folder version with the version from the MAMP folder. It's now working, just hope the switch doesn't cause any unforeseen issues.
  • Monjur Morshed Bappy
    Sun, 16 June 2013, 3:18 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.
  • Davo
    Sun, 16 June 2013, 3:50 PM
    Hi. There's no need to post the same message on both parts of the plugin. Please can you turn on debugging on your server and then check for any error messages (either on screen or in you Web server logs).
  • Richard Ryles
    Sun, 2 Feb 2014, 12:36 PM
    Since I've installed the PDF Feedback plugin I've been unable to backup my courses in which I've used the plugin. I keep getting an "error/baseelementexisting" when making a backup. I read somewhere that someone thought it was a php error so my tech guys upgraded php to 5.5.8 but I still get the error. I would appreciate any suggestions here. I've got many hours into these courses but no way to back them up.
  • Davo
    Mon, 3 Feb 2014, 4:03 AM
    Richard - I'll see if I can reproduce that error message, but first can you check that backing up a course without any assignments using my plugin works? Also can you check that you can backup a course which uses my plugin by not including that assignment in the backup?

    Turning on debugging on your site ( http://docs.moodle.org/en/Debugging ), to generate a longer error message, could also be helpful.
Please login to post comments