I read a book about students who were graduating from some kind of academy, where they trained to be the first people to visit a new planet, so they could scout it out or otherwise prepare it for colonisation. There is some kind of technology available on Earth, like a waygate, that colonists can pass through to reach the other planet.
The problem is, this class of graduates end up being lost on the other planet, instead of returning to Earth a few days or weeks after they arrive on the other planet and graduating. They are stuck there because there is some sort of malfunction with the waygate back on Earth, or perhaps interference from a supernova.
Eventually, after months or years, they have established a society within some caves on the planet, with their own form of crude government. Only then does a waygate open up from Earth again, and they are rescued.
Could anyone identify this story for me please?