A former teacher in Michigan has been convicted of having sex with a 12-year-old boy whom she met at a Flint elementary school.