Professor resigns after "Kafkaesque inquisition" at behest of student