The teacher allowed her student to pass the exam in a unique way