Former teacher pleads guilty to child porn charges