The teacher allegedly posed as a 13-year-old online and admitted to detectives that he viewed child pornography.