An apology will be issued on behalf of the state over the historic practice, the education secretary says.