However the latter is legally dubious and IIRC there are questions as to whether a school can legally stop you taking photos at a school sports day.
A school whilst a public building (like a hospital) functions on some principles of exclusion and therefore a private component does apply, for example, you can commit trespass etc. Therefore, in the case of a school and in relation to the example you gave ie a sports day then the data protection act would say that the photos, taken by parents, did not require permission as they were for personal use and the grounds of a school would fall under the allowed photography of external private property. This is providing they were used for personal use - placing them on open social networks for public display would then require consent as that would no longer be personal use.
For say photographs taken as part of a school project in school for school then the act of allowing the child into school would be taken as tacit consent. My contention was when the school would be using photography for essentially commercial reasons. Then the school would require consent. Or if the school were to exclude parents taking photos but then use a local third-party photographer and try to sell those photos.