I would also like to add an additional constraint, along with another possible solution I evaluated.
A student not only should be able to see only their own entries and not those of others, it should also be viewable in a single report/list. Teachers should also only be able to see only their own students' entries (which I implemented using groups) in a single report/list.
Another possible solution to implement my client's design is to have each test be its own Dataform activity. This would very neatly resolve all of the other requirements, as well as sidestepping the whole issue of unique records. However, there would be no single report that would show what the student and the teacher both need to see.
I have also seen this thread talking about the lack of unique records in the Dataform plugin, as well as this promising solution using intervals. For the latter, I unfortunately cannot implement it because the student's uploading of test data is irregular.