Pupils take the ‘green’ pledge