The legal issue in this case is, I think, whether or not the school administration has a legal duty that would have prevented this incident, or did the girl "assume the risk?"
If the sting plan involved a teacher being present, and no teacher is present, the school might argue that she put herself at risk by entering the boys room.
I'm not defending the school, by the way. My point is that it is naive to trust an authority figure. They have no duty, and they tend to be liars.