Troubleshooting an iPhone 4 connected to wifi, but can't connect to the internet
Go to Settings, then Network. Select your network. Click the accessory button to see the network settings.

If you don't have an IP address, scroll down and tap "Renew Lease".

If you have an IP address that is a 168... number, it means you are not getting an IP address from the school's server. You'll need to contact their sysadmins.

Hope this helps.