A single teacher's revision aid left inside a pupil's GCSE maths coursework led an exam board to investigate cheating at a Welsh school, it has emerged.
Hundreds of teenagers at Cardiff's Fitzalan high school were given provisional grades this summer pending the inquiry by English exam board OCR.
But staff and pupils were celebrating this week after an appeal went in their favour and their final grades shot up. An appeal board partly upheld the school's complaint, concluding there was no evidence of cheating.
However, revised grades were based on teacher assessments and predictions - not coursework. It was acknowledged there had been a "breach of security"
but pupils should not be punished.
Headteacher Huw Jones-Williams said the school was delighted with the outcome.
The teacher's guidance paper, found in the pupil's coursework, was put down to an "administrative collation error". Mr Jones-Williams said measures would be put in place to ensure it did not happen again.
Maths coursework accounts for 20 per cent of the final marks on OCR's GCSE maths paper, and many of Fitzalan's borderline A*-C grade pupils, awarded a provisional D-grade in August, were facing the possibility of resits.
At that time, deputy head Barry Phillips said the decision to penalise every pupil was unfair, and said OCR's concerns over coursework related to only one pupil.
School representatives met with exam board officials in Cambridge earlier in the term before appealing against the decision. In the summer letters were sent out to parents explaining why their children's grades were lower than anticipated. A meeting was held on the first day of term to reassure parents and pupils.
Exam board OCR said the investigation should serve as a warning to other schools that if they fell foul of the rules they would be investigated.
Jennifer Roberts, OCR spokesperson, said: "Exam boards have stringent procedures in place to ensure that examinations are fair to all candidates.
This time it was decided not to punish the pupils."
Forty-four schools and colleges in Wales use OCR as an examining body for maths. Fitzalan high was the only one to be investigated over coursework content.