The university plans include housing for 1,426 students on its existing West Campus site, off Cottingham Road.

The secondary school's main concern related to accommodation block J, which is around 88 ft (27m) from the school.

Head teacher, Vicky Callaghan, said two concerns had prompted their objection to the scheme.

"Firstly what you may be able to see. Whether that is a naked person or people up to something perhaps they should not be doing or illegal activity such as cannabis use.

"Also parents did have some concerns that their children could be overlooked during the school day and most of that concern was around if they were playing sport and not dressed in normal full school uniform."

Image copyrightPaul HarropImage caption
The secondary school is adjacent to the University's West Campus

The school had hoped changes could have been made to the design to ensure an appropriate barrier between the school and the university accommodation.

Ms Callaghan said she was not totally satisfied with the planning decision but said she accepted the university was willing to continue discussions.

In a statement, the university said it and the school had co-existed without problems for many years.

It said a number of alterations had already been made to the design to address the school's concerns including an 8ft (2.4m) timber fence and some bedrooms would be fitted with "obscured glazing" and that it would continue to work with them.