Oxgangs Primary is the school at the heart of the current issue.

Safety checks undertaken after the building was damaged in a storm uncovered structural concerns. Three other schools were then closed last week over problems with the way walls had been built ten years ago.

The schools had been expected to reopen after the Easter break but officials said fresh issues has surfaced during remedial work the school on Friday.

The 17 schools built by Miller Construction under a Private Finance Initiative project were then closed pending an investigation.

Edinburgh City Council chief executive Andrew Kerr has also confirmed similar faults at Craigmount and Gracemount High Schools.

The schools, which have rolls of 1200 and 623 respectively, will need to be closed for repairs.

Oxgangs Primary was constructed as part of a wider programme involving 17 schools that were built or refurbished for £360m.

Edinburgh City Council and a private finance consortium made the deal under the Public Private Partnership 1 (PPP1) scheme.

The schools were been built by Miller Construction, which was acquired by Galliford Try in 2014.

Responsibility for the upkeep of the schools falls on Edinburgh Schools Partnership (ESP), with partner Amey BPO Services providing maintenance.

In a statement, Edinburgh Schools Partnership (ESP) said: "The standard of construction carried out by the building contractor is completely unacceptable and we are now undertaking full structural surveys on all PPP1 schools to determine whether this issue is more widespread.

"For the safety of all pupils and staff, the schools will be closed while this work is under way.

"Edinburgh Schools Partnership will accept full financial responsibility for investigating and resolving these issues to ensure that each and every PPP1 school undergoes all necessary remedial work.

"We would like to apologise to parents and pupils for all of the uncertainty and inconvenience caused, and give our sincere assurances that we will fix these issues."

In Edinburgh City Council region, 17 schools are currently closed as an investigation takes place.

These are Braidburn School, Broomhouse Primary School, Castleview Primary School, Craigmount High School, Craigour Park Primary, Craigroyston Primary School, Drummond Community High School, Firrhill High School, Forthview Primary School, Gracemount High School, Oxgangs Primary School, Pirniehill Primary School, Rowanfield Service School, Royal High School, St David's Primary School, St Joseph's Primary School and St Peters RC Primary School.

Goodtrees Neighbourhood Centre and Howdenhall Secure Unit are also affected.

The schools will be closed until they are deemed safe by the council. It announced late on Friday that the buildings required detailed surveys.

Parents have been told to make childcare arrangements for the next week. The closures affect a total of 7688 primary and secondary pupils, with nursery children also affected.

An update from Edinburgh City Council on contingency plans for parents and pupils is expected on Tuesday, while employers are being urged to be flexible with parents to allow them to juggle childcare issues.

STV News has approached all 32 Scottish councils to confirm whether or not Miller Construction has been involved in building PPP projects.

A number of Scottish councils have confirmed they have PPP schools built by Miller Construction. Three in Glasgow were built by the company, and an Inverclyde Council spokesman said: "We have four schools built by Miller."

Public Private Partnerships (PPP) and Private Finance Initiatives (PFI) are very similar.

PPP is a generic term used to describe partnerships which involve more flexible methods of financing and operating facilities, while PFI is a particular method of financing private investment which requires the private sector to design, build, finance and operate facilities.

They were introduced as a way to build schools, hospitals and other public buildings and infrastructure.

Private contractors pay for the construction of the projects and then lease the buildings back to the government.

PFI was used primarily by the Labour/Liberal Democrat administration at Holyrood for funding big building and infrastructure projects.

It was scrapped by the SNP when it came to power in 2007 and the alternative Scottish Futures Trust was established. However there are currently 34 ongoing school PFI contracts across Scotland.

In 2014, the Non-Profit Distributing (NPD) model was introduced by the Scottish Government. In this deal, contractors invest solely in the debt of a project, not putting in any equity and not receiving returns on their capital investment. There are four schools contracts delivered through NPD prior to the Schools for the Future programme, in Moray, Aberdeen City, Falkirk and Argyll and Bute.

Critics liken the scheme to privatisation and claim the deals cost more in the long run than using taxpayers' money.

A treasury committee called the PFI system "poor value for money", saying it was no more efficient than other borrowing and it was "illusory" that it shielded the taxpayer from risk.

It was widely used by Labour in Scotland from 1997 but criticism has focused on the costs involved and the ultimate liabilities for the taxpayer.

There are now concerns about the safety of those projects, built by after the structural problems discovered in Edinburgh. Teaching unions are calling for an "urgent review" of all PPP/PFI contracts.