School settles over spying on students