Schools are given advice after an online glitch allowed pupils to see the correct answer in a spelling test.