FOR SEVERAL YEARS, schools and courts have been wrestling with the question of whether students may be disciplined for statements posted online. But what if the person who posts the problematic message is a teacher?

Last week the U.S. 3rd Circuit Court of Appeals in Philadelphia rejected a free-speech claim by Natalie Munroe, a high school English teacher who was fired after publishing a blog containing caustic comments about pupils and parents alike (intended for friends, but not password-protected). The court made the right decision. A teacher has a right to blog - or write a letter to the editor - about politics or social policy or even educational issues. But that right doesn't extend to sarcastic riffs about one's students.

Although Munroe didn't identify either her students or her school by name, she referred to one student as "the jerk who was out three days around our last major assessment because his family took him on trip to Puerto Rico," and quoted the words of another she described as an "obnoxious kid." In a flight of fancy, she offered a litany of alternatives to standard phrases used to evaluate students on report cards. They included "dunderhead," "weirdest kid I've ever met" and "utterly loathsome in all imaginable ways."

After students began circulating some of Munroe's blog posts, several parents asked that their children not be assigned to her classroom. She was allowed to return to the school after a suspension and maternity leave, but eventually was fired. The school cited "poor performance," but Munroe claimed she was punished for engaging in speech protected by the First Amendment.

The appeals court convincingly held that Munroe's speech was "sufficiently disruptive so as to diminish any legitimate interest in its expression." The court added that Munroe couldn't benefit from rulings holding that government employees may express opinions on "matters of public concern." That protection must be balanced, the court noted, against the state's interest in the efficiency of public services.

As Judge Robert E. Cowen wrote in the majority opinion: "When a teacher's derogatory comments about his or her students cause numerous parents to tell the school district that they 'don't want her as my child's teacher,' it is appropriate to conclude that his or her speech impedes the performance of the speaker's duties as a teacher."

Teaching is a stressful and often thankless profession, and Munroe isn't the first practitioner to seek release in humor and ridicule. But she shouldn't have posted her put-downs where there was any chance that her students and their parents could see them.