A court has ruled that a ban on Muslim teachers wearing headscarves in schools was legal. It said that teachers who covered their heads violated their obligations to keep religious expression out of the classroom. A German court announced Tuesday it had upheld a ban on Muslim teachers wearing headscarves in schools in the state of Baden-W_rttemberg. A state administrative court of appeal in the city of Mannheim ruled teachers cannot cover their heads in the classroom — at least not if they do so for religious reasons. The court’s decision overturned an earlier ruling in 2006 by a lower court, which decided in favor of a teacher who had converted to Islam. The teacher, who had worn a headscarf since 1995, took her case to court after the school board in the state capital of Stuttgart ordered her to stop wearing a headscarf in the classroom.