Some inmates at a women's prison felt downgraded because they no longer had a single cell and had to share toilets and showers, an inspection found.
Scotland has fallen down international education rankings
Scotland has fallen down international education rankings for core school subjects, according to a major world study.
The survey of 15-year-olds found Scotland's performance in reading, maths and science had declined relative to other Organisation for Economic Co-operation and Development (OECD) countries, the 2015 Programme for International Student Assessment (Pisa) shows.
Scotland was ranked above the OECD average for reading and science in the 2012 study, and at average in maths, but is now similar to the average for all three subjects.
Having ranked as the highest in the UK for reading and maths, Scotland now lags behind England and Northern Ireland for both subjects.
Education Secretary John Swinney said the results made for "uncomfortable reading'' and showed the need for reform of Scotland's education system.
The OECD research surveyed about 540,000 students worldwide in 2015 and uses a points system to rank 72 countries against each other, also looking at countries such as Scotland which are part of larger states.
Against its own 2012 ratings, Scotland fell 13 points in reading, seven points in maths and 16 points in science.
For reading, Scotland scored 493 points, seven lower than England and four lower than Northern Ireland.
Scotland was just two points behind both countries for maths, at 491, while in science Scotland slipped further behind England with 497 points compared to 512.
Wales is the worst-performing UK country across all three subjects, the survey found.
Mr Swinney said: "There is great strength in Scottish education but these results underline the case for radical reform of Scotland's education system.
"The results undoubtedly make uncomfortable reading but they contain a plain message: we must continue to make the changes that are necessary to strengthen Scottish education.
"We must recognise that while Pisa is only now being published, it dates from the period in which our own statistics on literacy and numeracy were published and prompted our current programme of reform. Both sets of figures tell us the same thing. Reform is essential.
"That is why last year we launched a comprehensive programme of reform, based firmly on the independent findings of the 2015 OECD review of Scottish education.
"It is by carrying through on these reforms - no matter how controversial - that we can make Scottish education world-class again.''
Keir Bloomer, chairman of the Commission on School Reform said: ``Scotland has taken part in every PISA study since 2000. In 2000 its results were well above the OECD average in all three subject areas. Its performance is not now above average in any subject area.
"It is no longer credible to describe Scotland's education system as world leading.
"There is a critical and urgent need to examine how Scottish education is run, and the Scottish Government's stated intention to empower teachers, parents and schools must be matched by action.''
The Scottish Secondary Teachers' Association (SSTA) said the figures were "no surprise'' but highlighted responses showing Scotland is ahead of other OECD countries in teacher student relations with nearly 45% of students stay with teachers shows an interest in every student's learning in "every lesson'' compared to around 34% elsewhere.
SSTA General Secretary, Seamus Searson, said: "These figures come as no surprise. SSTA members have been concerned about the effect workload and assessment pressure are having on teachers and youngsters for a while which is why we are now engaged in industrial action.''
Labour Education spokesperson Iain Gray said: "SNP ministers should be ashamed of these results. For all their warm words about making education a priority we are seeing performance going backwards as Scotland drops down international league tables.
"These are terrible results after ten years of SNP government. They must wake up to the fact that their year-on-year cuts to school budgets, teachers numbers and support staff are damaging the life chances of Scotland's children.''
Scottish Conservative shadow education secretary Liz Smith said the results showed a "decade of failure'' under the SNP.
She said: "Children going through our schools under the SNP are finishing their school careers less equipped in basic skills and performing less well than their counterparts elsewhere in the UK, and in a host of other countries across the world.
"This is the SNP's responsibility, and it very much deserves to feel the heat on this most critical of matters.''
Scottish Liberal Democrat spokesman Tavish Scott said: "There is no escaping the fact that surveys show the SNP have overseen a worrying decline in our education system. The SNP have big questions to ask and only they can answer them.
"A decade of Curriculum for Excellence under their watch has led to these results. Pupils, parents and teachers want and deserve better.
"The Scottish Government must now use the powers they have to reverse this position. They must invest new money in pupils, teachers and Scottish classrooms rather than cut education spending in the forthcoming Budget.''
One in four people over the age of 45 does not have a neighbour they can call on for a favour or help, a study shows.
Scottish retail sales increased 4.3% in December, providing a boost for businesses over the vital Christmas period.
A Holyrood committee plans to examine the feasibility of introducing a universal basic income.
Most Viewed Pictures On Heart
Recently Played Tracks
To listen live, choose your preferred location:
On TV: Heart's Happy Hour Breakfast!
8am - 9am
Now playing: Non-stop hit music
Deposit £10 to get a £40 Welcome Bonus - That's £50 to play bingo, slots and more!*
Over 50 tracks to make you feel-good. New album out now...
Find your local four day weather report here.
Make Heart the soundtrack to your day and you could be a winner with great prizes up for grabs throughout the day.
Find out more about some of the companies advertising on Heart Scotland- East.