For a teacher to have a ‘relationship’ with a student is regarded as unprofessional.
But not illegal or immoral when that relationship is platonic.