Does anybody have any solutions in place or know of a way to set different wireless access policies based on location?

All of our students have laptops and I would like to force them to use the schools wireless when they are in the building but outside of the building I want them to be able to use whatever wireless is available.

Currently we have a policy that automatically connects them to the schools wifi but nothing is preventing them from disconnecting and finding a different hot spot while in the building.