Solution Request
Preparing Sample Solutions
We typically release sample solutions for each assignment after the deadline (typically the following day). These will either be prepared by ISAs or the instructors (this should be discussed and decided at the beginning of term) but should be proofread by both ISAs and instructors before posting. These solutions should follow the style guide, and should be correct (passing all correctness tests and including all required check-expect cases). There are often many approaches to solving assignment questions, so the sample solutions should highlight the cleanest, most direct approach so that students can understand and learn from the solutions. We do not post sample solutions for the bonuses, as these tend to be re-used from year to year.
Posting Sample Solutions
Sample solutions for CS135 are compiled into a single aXX_soln.pdf file and made available for students to download from the course website. When a student requests a solution set, protectPDF/watermarkalt.sh will add a watermark of the student's userid to the pdf, and we save a record of the request in protectPDF/log.txt. This lets us track who has accessed the solutions, and, if solutions are being distributed around the internet, we can track down which student distributed these solutions. Sample solutions should be posted the day after the assignment is due and the process is as follows:
- Prepare sample solutions as described above.
- Compile code from all question files into a single aXX_soln.rkt file. It helps to include a header for each assignment question that labels where each new question begins (similar to what the style guide suggests students do in their submissions).
- Create an aXX_soln.pdf file from aXX_soln.rkt (in DrRacket, File->Print Definitions and then print/save to PDF). DrRacket will create a pdf that looks exactly like what the editor shows for your file. Any black highlighting, highlighted selections, or flashing insertion points will be included in the created pdf. Be sure to double-check the pdf after it has been created to make sure nothing unintended has been included.
- Put the created aXX_soln.pdf in the course account under protectPDF/aXX_soln/aXX_soln.pdf. Ensure both the aXX_soln directory and the aXX_soln.pdf file have 710 permissions (rwxr---- or rwxr-s---).
- Edit protectPDF/config.php to include an entry in $file_list for the assignment. This typically means uncommenting a line like " 'aXX_soln'=>'Assignment XX Solution',".
- Double-check that the solutions are properly accessible from the webste, https://student.cs.uwaterloo.ca/~cs135/assess/solutions/
Notes:
- The process relies on a program named <noautolink>ImageMagick</noautolink> (free). The installation on the solaris machines is out of date, so we ssh to a linux machine to do the actual work.
- The system tries to clean up temporary files, etc. after itself but if students leave the page before the work is done, stuff may get left behind. Clean up the cs135/protectPDF directory periodically. Everything with a long random name can go.
- The script has recently been updated to be able to handle PDFs up to 9999 pages long, making it suitable for releasing exam review slides. However, doing so may overtax the system and cause errors if many students are requesting at the same time.
- In Fall 2014, the system was overwhelmed by students requesting in excess of 4500 review pdfs (120 slides) in a period of several hours. There has since been a 5 minute request cooldown implemented to prevent this. If students get impatient and re-request a solution while the system is still running it will stop the process and tell them to wait 5 minutes before requesting another solution. Students can misinterpret this as the page not working correctly.
- In Fall 2020, we offered online exams which would overwork the system if all students requested their copy of the exam at the same time. We pre-generated watermarked versions of the exam for each student so that each student could immediately access their exam without waiting for the watermarking script to run.
--
Ben Hicks - 2020-12-23