One time in college. A teacher did something like this with hw and solutions being "hidden"/"censored". And I was easily able to get around it and have all the solutions :/
Unfortunately, they did this without disabling the Excel feature that saved undo data in the file, so anyone in the class was able to hit Ctrl+Z a couple of times and see the entire list of grades.