A former Wisconsin high school teacher accused of secretly videotaping undressed students during field trips was sentenced Friday to 12 years in prison after reaching a plea deal with federal prosecutors.