A final-year undergraduate student said in a complaint that the professor subjected her to sustained sexual harassment over the past three years, both in person and through obscene messages