Of course, I'm opposed to whipping as a punishment, but it seems to me that if you go to a foreign country to teach people's children, you have a responsibility to learn the deep beliefs of the culture you've entered and to adapt to it. Think of a foreign teacher coming to the United States to teach in our public schools. We would expect her to refrain from from leading the students in a prayer, and she would be sanctioned if she didn't comply. People in other countries might think, what is wrong with these Americans? All the teacher did was say a harmless, voluntary nonsectarian prayer.
Now, if the police burst into the classroom and tasered her [this hypothetical American teacher], there'd be cause to complain. The problem in this Sudan case is the punishment not what is considered an offense. In fact, even in the United States, I think a teacher should refrain from calling a teddy bear Muhammad. The practice of avoiding offense to religion in public school is not a violation of the principle of separating religion and state or the right to free speech.
I'm not talking about the more general problem raised by criminalizing "blasphemy." Clearly, that violates principles of free speech and separating religion and state. This case concerns a teacher who is trusted with the education of children. It is no answer that the children got the idea of naming the bear "Muhammad." The teacher is obligated to guide them. Think how you'd feel if your child's classroom had a teddy bear named "Shithead," and the explanation was that the kids named it.
CORRECTION: The heading to this post originally had that the woman was "sentenced" to 40 lashes. She has been arrested and faces that sentence. One hopes that the outcry against this will spare her.