It sounds like you did okay. Nice use of atemiwaza.
Seriously, I hope our collective advice helped, but the most important thing is to listen to your heart. Glenn Matsuda Sensei from New York once told my class that the only two people who know what's going on in a relationship are the two people in it.
I do feel the need to clarify one piece of advice that I gave. When I suggested you ignore the guy, I was suggesting that you ignore him in a manner that is aware and confident, not submissive. I agree with the other posters that submissiveness can be a problem. However, if you are confident and centered, you can let a lot of stuff slide. And, if action is called for, you'll be moving from a good place.
I'm sorry you got detention, but at least things were resolved without too much fuss.