A former WA high school teacher is sentenced to more than three years in prison for distributing child exploitation material online.