Putting aside the question of whether or not she was bullied into confessing to something that she didn't do, the ongoing issues with the school etc I would say that as a general rule handwriting is NOT an appropriate punishment for a kid with dysgraphia. If your DD is at all like mine she has only a finite amount of writing she can do in a day. I would much rather see it put towards legitimate school work than writing this sentence 25 times. In my DD's case writing causes her physical pain so I would characterize this punishment as akin to corporal punishment, and therefore totally inappropriate in a school setting. As polarbear said in a previous post a teacher who thinks this is appropriate clearly either doesn't understand the issues your DD faces or just plain doesn't care.

I really hope she ends up in a better situation next year! Good luck.