Let's see... what is marriage? what does it means for you?
Marriage was 'made up' for people by people, religion apart it is just a contract (with much more social status and stuff ofc). So if 2 people are in love with each other and do desire to make love (and are responsible) why to wait for marriage? Is it to check if the relationship survives till then (so it would be like a prize?) ?
I don't think love or sex must be connected to marriage that way.
Anyway, i think your class mate was a problem. I don't know if you even told your parents about that, i just know if my parents knew about something like that they would run into my school to show some maners to that teacher

cos the teacher was on charge, she should have done something about it.