Autolab icon indicating copy to clipboard operation
Autolab copied to clipboard

Custom per-student handouts: Record which student got what in the database, notify autograder

Open zackw opened this issue 1 year ago • 0 comments

Your environment

  • Carnegie Mellon's Autolab at https://autolab.andrew.cmu.edu/
  • which says "v2.10.0" in the lower right hand corner

Current behavior

CMU's 15-213 has two labs ("bomblab" and "attacklab") for which each student gets their own custom version of the handout. To implement this, we currently build many versions of each handout in advance. The handout hook picks one, writes a file to the filesystem that records it's been issued to that student, and generates a tarball. If the same student tries to re-download the handout, we scan the filesystem, find the file that says "this one went to this student", and send them the same tarball again.

The handout hook also appends the "this one went to this student" file to autograde.tar so that the autograder knows which student got which handout, and can reject submissions by the wrong student.

This is a lot of extra code to write and involves tricky locking. This term we've got a case where the same handout was issued to two students and I have no idea what went wrong.

(Footnote for Greg Kesden: This description reflects the code on the ubuntu22-port branch of each lab. 18-213 is still using the older code that broke when 15-213's tranche of the sharks were upgraded. That code is equally fragile and problematic but for different reasons.)

Desired behavior

The assessment handout hook should be able to record a short string in the database, keyed by (course id, assessment, id, student id), and retrieve it again later. For the labs I care about, this string would identify which handout went to which student. The handout hook would use it to ensure that each handout goes to only one student, and if a student downloads the handout a second time, they get the same one they got the first time.

The string should be communicated to the autograder somehow. Two possibilities that would work for me are: it could be written to a fourth file in the grading container (along with autograde-Makefile, autograde.tar, and the handin) or it could be an environment variable set when autograde-Makefile is invoked.

Finally, the string should be visible in the instructor UI and it should be possible for the instructor to clear or change it. This is necessary because the randomization of these labs sometimes produces unsolvable exercises. We try to test for this at build time and discard unsolvable exercises, but we're not sure the tests are bulletproof.

zackw avatar Feb 14 '23 15:02 zackw