Well, first of all, I think that might be a lesson. Not saying that listening to music while doing homework is a bad thing I listen to music while doing homework, but while being in class might be a bad idea and now you have an idea of why. Maybe ask if there is an extra assignment that could make up for it, maybe you could offer to help her out with something, just maybe offer a helping hand and show that you're a good student.