Moodle plugins directory: PDF feedback | Moodle.org
PDF feedback
Assignment feedbacks ::: assignfeedback_pdf
Maintained by Davo 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
Contributors
Davo Smith (Lead maintainer)
Please login to view contributors details and/or to contact them
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!
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.
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
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.
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.
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
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.
any kind of help is appreciated.
Turning on debugging on your site ( http://docs.moodle.org/en/Debugging ), to generate a longer error message, could also be helpful.