Arbitrary File Names for Upload

Currently, an assessment requires a fixed submission filename. e.g., in the 'handin' section of the 'edit assessment' page, the "Handin Filename" is typically set to a fixed/static value such as BST.java, indicating, for example that students will all be submitting a file whose name is/should be BST.java.

In reality, students can submit any file, and autolab will rename it to the "Handin Filename". Mostly, this is good, as it ensures that students can't submit a file whose name collides with other files in the autograde.tar

However, at times this can obfuscate for the student precisely what file they submitted. Some assessments don't need explicit knowledge of the filename provided by the student -- it can be inferred from the context. For example, in 122, students are submitting java code that implements a WordlePlayer interface. The only requirement for the assignment is that their class name ends with 'Bot', so classes such as ScottBot or DumbBot are acceptable. The test harness looks for any *Bot.java file, and then uses reflection to instantiate it. However, students can't easily keep track of what file they've submitted to autolab since autolab renames all incoming submissions based on the Handin Filename (in this case WordleBot.java).

It would be better, if we could preserve the students original file name in this situation. Then a student could see (based on the filename alone, so without looking at the file contents), for example, that their first submission was DumbBot.java and their second submission was SmartBot.java.

The problem here, is that we can't allow an arbitrary filename, because a student submitting 'autograde.tar' would destroy the test harness. Currently, autolab stores submissions as <useremail>_<submission number>_<handin filename>. I suggest an alternate approach:

when the Handin Filename is set to '?', have autolab store submissions as <useremail>_<submission number>_submission-<name of file actually submitted>

I expect that much/all of the downstream logic of moving the file to tango, will still work, but each file will be sent to tango as submission-<name of file actually submitted>. The test harness can simply verify that the submitted file won't collide with others and then strip the submission- prefix.

Edited by wallaces