Unless they were mistaken in their assessment and the teacher was indeed a wizard, in which case they deserve every minute of their detention sentence.