A school in Brentwood has pleaded guilty to breaching health and safety regulations after a worker was injured as he fell from a roof.