Ok so I dont remember when I watched it, but I know it was on tv. In the film the main character is a male and he goes to high school. He is in class and the bell rings and all the students leave. The teacher(female) tells him to stay. She starts flirting and stuff then start to take off her clothes. But just then the door opens and the next class walks in. She quickly covers herself. So pretty much one of the students (female) is obsessed with him and so is the teacher. They both want to be with him but he is having alot of trouble.
maybe “Three O’Clock High”.
https://en.wikipedia.org/wiki/Three_O'Clock_High
might be a long shot but…”one night in heaven” from 1983?