The existing data say "partly" rather than "largely." There is still a substantial influence of environmental factors found in any study of "broad heritability" (which is a characteristic of groups, not of individuals) of IQ. And at the individual level, there is a very large malleability of IQ through the best known interventions. Important data showing the powerful effect of environmental influences on IQ include the trends in raw scores on IQ tests over time in most countries of the world, resulting in the need to renorm IQ tests every half generation or so.
All these data and more can be found cited to primary sources in Intelligence and How to Get It: Why Schools and Cultures Count by Richard E. Nisbett,
http://www.amazon.com/Intelligence-How-Get-Schools-Cultures/...
a recently published book that is well worth a read.
http://www.wwnorton.com/catalog/winter09/006505.htm
http://www.amazon.com/Intelligence-How-Get-Schools-Cultures/...
which does happen to be well worth reading.
http://www.amazon.com/Intelligence-How-Get-Schools-Cultures/...
is the subject of an academic study group I'm participating in this semester
http://www.psych.umn.edu/courses/fall09/mcguem/psy8935/defau...
and one of the amazing conclusions from broad literature reviews is that there is STILL remarkably little research on educational outcomes with sound experimental designs.
http://norvig.com/experiment-design.html
There may be some rather inexpensive and simple (once discovered) interventions that could do a lot to close group achievement gaps, but today no one is sure at all.