Assignment Solutions Request using PHP's GD Library
Background Information
Several CS courses post solutions online with the student's Quest ID as a watermark. This page describes a PHP script that provides such a feature. The script uses PHP's GD image library. Students will see the solutions as a PNG image file. Sample output (shrunken):
There is another set of scripts (AssignmentSolutionPHPScript) which also adds watermarks. Those scripts use PHP too, but the image processing is done with a bash script and ImageMagick.
Setting Up the Script
blah blah
What To Do For Each Assignment
blah blah blah
Who can view solutions?
Only these people can view solutions:
- Students listed in /u/csXXX/.classlist
- Students listed in /u/csXXX/.exceptions
You can manually grant access for specific students by putting them in this file. Each line in .exceptions should be this form:
studentIDno:QuestID
Please don't add any spaces or tabs at the end. Example line: 20401835:j9smith
- Staff listed in the
$staff
array in generateWatermark.php*
Staff can add a
u
variable at the end of the variable to change the watermark text. For example:
https://www.student.cs.uwaterloo.ca/~cs115/SolnsWatermark/generateWatermark.php?assn=a00q1&_u=whatever_
Topic revision: r2 - 2011-12-19
- YiLee