I’ve been doing some reading about this. At some universities you would have to formally declare the relationship to your higher-ups and apply for an exception. At others, it seems to be prohibited. I was in a technically worse situation, same department but no direct (or likely) student-teacher relationship. But that was back in the dark ages.
2 Likes