A top judge had to weigh the rights of a teenager terribly injured in a school playground hammer attack and the privacy of his former fellow pupils.

Henry Webster was a 15-year-old pupil at Ridgeway Foundation School in Wroughton when he was beaten by pupils and young men from outside the school.

One of them repeatedly hit him with a hammer, fracturing the his skull and causing devastating brain damage. Henry still suffers severe emotional problems as a result of the January 2007 attack – during which he was conscious throughout. Thirteen young men and boys were sentenced for their parts in the incident following two trials at Bristol Crown Court.

Now Henry, of Wroughton, is suing the school for damages. In a preliminary skirmish at the High Court, a top judge had to balance the need of his legal team to gather evidence against the basic human right of former pupils not to have their records unnecessarily disclosed.

Ronald Walker QC, for the school, argued that disclosure of vast quantities of documentary and electronic material to Henry’s lawyers might violate the Data Protection Act or Article 8 of the Human Rights Convention, which enshrines the right to privacy.

Material Henry’s lawyers wanted to see included minutes of staff meetings, documents relating to the school’s attempts to assess racial tension, the school’s exclusion records and its “log” of racial incidents and bullying investigations.

Mr Justice Nicol gave detailed directions on disclosure of material, allowing Henry’s lawyers to see some documents. He said that the names of individual pupils must, in most cases, be edited out of disclosed material, although the school must reveal “race or ethnicity” of pupils concerned.

If Henry, now 18, wins his case against the school in October, he could be in line for seven-figure compensation.

His barrister, Robert Glancy QC, said: “Our case will be that, if the school had only paid heed to the whole atmosphere of racial tension and incidents, and dealt with it as we say they should have done, then this attack would not have occurred.”

The school strenuously denies liability in the case.