A: This sounds like a teacher or classroom-specific problem, since your daughter only behaves this way in class. Start by talking with the teacher to see what seems to trigger this behavior. What leads up to it? Is it only her new "bad" friend? Can they be separated? What has been tried in the classroom?
Sometimes, teachers are so overwhelmed with too many children in the classroom. Is there a school counselor who might be brought in to help? Work together, involving your daughter and her teacher, to create a behavior chart that rewards progress towards a goal that is meaningful to her. And since we're at the end of the school year, make sure to sit down with the counselor and the principal to talk about the problem, with an eye towards preventing it NEXT year. Any kid can have a bad year, but you don't want it to continue. Otherwise your daughter could develop bad habits at school that could be more difficult to solve.
If you can't get help from the school, keep going "up the chain,"- or seek a different school that WILL help.