Assignments Aimed at "Requiring a Statement" of Ideological Belief from Students May Violate First Amendment
So holds a Fifth Circuit panel (by a 2-to-1 vote), in an assignment requiring the writing of the Pledge of Allegiance, but the same argument would apply, I think, to compelled statements of other ideologies, whether related to patriotism, race, sex, sexual orientation, or anything else.