The jury accepted Harvey's lawyer's claim that he was in such a state at the class's behaviour that he could not have intended to harm the boy. Harvey admitted grievous bodily harm without intent. He thought he had killed the boy.
I accept that it seems likely that the victim was an annoying little twat and the teacher was provoked but to acquit him of attempted murder seems perverse.
If the the judge and jury had decided that he was not in a fit mental state to be responsible for his actions then why did he plead guilty to GBH?