This appears to be one of those cases where, from a legal perspective (and that's all the court is dealing with here), the law was sufficiently ambiguous as to dismiss the case against the teacher (who did resign from his job).
From a moral perspective, however, the teacher clearly abused his power as a teacher. He had no business messing with ANY student, irrespective of age.
But morals often can't be legislated.
I think the title of the story is a bit disengenuous and, like most news account titles, is meant to titillate and provoke.