Pupils had to be educated off site for seven months