Is it possible that this sudden change in attitude toward school is not related to academics at all but to something that has started happening recently socially that she is uncomfortable telling you directly? Children often use very indirect ways of indicating something is wrong. Could other kids have started ganging up on her? Could abuse be occurring by a teacher or another classmate? Could bullying be occurring? All of these things can lead to shame in the victim, and discomfort directly telling others what's going on.

She's expressed the desire to advance so she is no longer in her current school situation. What happens if you suggest moving her to a different school? If she is equally morose about that idea, then perhaps it's nothing related specifically to people at this school. But if she's interested in discussing a different school, maybe something is going on at her current school that she hasn't fully revealed to you. Best of luck working with your DD to get her into a happier place.