Bit my nails from a very young age, the result of nervousness and boredom, and tried many tricks ON MYSELF, including using my allowance to buy nasty-tasting stuff, in an attempt to break my own habit. It's not easy, and nagging from my mom only made it harder. So, it's possible she's stuck with it until she decides to find her own way to stop.
Here are a few tricks that helped me when I was ready: I carried a file and kept nails smooth so there was no starting point for nibbling or tearing; I found a seashell and a smooth stone, which I chose because they felt "just right," to carry in a pocket. I'd handle these when I felt the urge to chew. I also learned to dig little ridges and dents into the edges of a piece of scratch paper, or a styro cup if I happened to have one in hand, to satisfy my fingernail's "needs" to be stimulated by biting or digging.
A friend of mine also reported that chewing gum gave her teeth something to do, but that probably can't be done in most classrooms. At any rate, there is a distinct need for stimulus that some children experience, and finding acceptable, non-damaging alternatives can help.
I hope you'll steer her away from nail polish, which has unforgivably toxic ingredients. But a nail buffer can give a similar shine which can make a girl proud of her nails.