Back when Dino's roamed the earth before harassment was in the workplace, I had classmates that did this all the time. The teacher was young ( & some would say hot ), single and she handled my classmates with great wisdom. She couldn't stop them, given the era, but she set boundaries and it never crossed the line, even if they were a corpuscles or raging testosterone.
Different world today...