I'm trying to understand why anybody is talking about the intent to cheat, as if it's something separate from cheating (i.e. "she didn't cheat, but she intended to").... she wrote down the 3 questions with the answer that she put. She was going to come home check for the answer and hope to put that answer tomorrow if her teacher would let her finish the test.
Plain and simple, she did cheat. The teacher prevented her success.
If the teacher didn't catch her, and the next day came, she would have amended her answers as needed. Wasn't that the plan?
Ultimately, she cheated, and got caught. She gets the zero, and what you do at home about it is your prerogative.
And as far as the way the teacher handled the situation, I can tell you that in all of my school years, whether it was me, or any other kids, we were never afforded some form of dignity, where the teacher would keep us after class and tell us our fate without any other kids around. It was public, and it was intended to shame.
We as a society teach our kids about the kinds of things that we've deemed acceptable as a society, so the kids laughing at her and calling her a cheater is merely a result of what's been taught to them ... that cheating is wrong, and we should look down upon those that cheat.
Ultimately, she'll be watched closer during tests in the near future (and perhaps beyond), and that should be just fine, because she shouldn't be cheating in the future, thus there's nothing to catch.