Are there grounds for a legal action here?:
I don't think so.  I'm sure he's not the first student to think of this.  It's a given.  You're taking a test to show what you have learned.  Obviously he's learned nothing!

That would be like getting surgery on your heart and after the doctor says, "oh you wanted it done correctly? Well, you didn't say that".

Tell him to take the energy he's scheming with to STUDY!