Learning physics in context: a study of student learning about electricity and magnetism