Middle schoolers did better with science lessons when they could learn online, watching videos, playing educational games, running virtual experiments and collaborating with classmates.