The autumn of 2012 was not a happy time for Edinburgh’s Castlebrae Community High School.

It had recorded some of Scotland’s poorest exam results, as well as the worst truancy and exclusion rates. Disheartened parents across Greendykes and Craigmillar were voting with their feet, sending the roll plunging 21 per cent from 251 in 2011 to 198.

Seeing no way forward, education officials pressed the nuclear button and unveiled closure proposals. “We need to lance the boil,” said a senior council source in September 2012. “If we kept [Castlebrae] open, it would be failing a whole future cohort of children.”

Although recommendations to shut the school were dramatically rejected following a spirited community campaign, its troubles continued. In 2015, after fresh turbulence wrought by senior management changes, the roll sank to a 12-year low of 118.

READ MORE: Violence 'becoming normalised' in Scotland's schools

Today, however, things are looking up. And if many previously considered Castlebrae to be the epitome of a failing school, recent progress suggests the foundations are in place for a brighter future.

Government figures covering 2019 show that, for the second year in a row, every single one of its S4-6 leavers moved on to a positive initial destination such as work, training or further study. The 2012 rate was just 42%.

Castlebrae’s once plummeting roll is also rising sharply. It shot up from 241 to 284 between 2019 and last year, while average attendance over the 2009-18 period increased by nearly 8% to 89.3%.

Attainment in the senior phase has tended to fluctuate. Nevertheless, statistics for 2018-19 and 2019-20 reveal well over half of leavers secured at least three awards at SCQF level 5 - which includes National 5 - or better. Senior staff also stress that five-year pass rate trends at the school - where more than four fifths of pupils come from areas classified as Quintile 1 or 2 under the Scottish Index of Multiple Deprivation - are improving.

Headteacher Norma Prentice said work to restore confidence and ambition had been painstaking. “When I arrived here in 2014 the S1 roll was eight,” she told The Herald.

The Herald: An aerial view of the new school under construction in Craigmillar, Edinburgh. Pupils and staff are expected to move in sometime after Christmas.An aerial view of the new school under construction in Craigmillar, Edinburgh. Pupils and staff are expected to move in sometime after Christmas.

“It has been a slow build-up since then but our projected roll next year in S1 is 120. The sense in the community now is that we are a truly comprehensive school.

“We have pupils who are aiming to do their five Highers and we also have pupils who need to be nurtured. Word of mouth among our parents is very powerful and is increasing our numbers.

“In terms of attainment, we’re now outperforming our virtual comparators [a sample group of pupils from other parts of Scotland who have similar characteristics to those at Castlebrae] on virtually every measure. The key thing is pupil welfare. If you don’t look after pupil welfare, you don’t get the good attainment.

“In terms of exams and awards, our five-year trend is definitely up. [In terms of SIMD deciles], we outperform in the most deprived 20% and middle 60%, but what we have to target is our top 20% - the results of those living in better off circumstances.”

Castlebrae’s fortunes have been helped by the Government’s Scottish Attainment Challenge (SAC) and Pupil Equity Fund (PEF), which provide assistance in areas such as boosting literacy and numeracy, and “poverty-proofing” the school day. Major companies including Baillie Gifford and JP Morgan are also supporting its training and career development offer.

READ MORE: Schools 'face chaos' due to results extension

“When our pupils arrive in the morning, everything is equal,” said Ms Prentice. “They wear blazers, for example, but those are paid for out of PEF. Our pupils can pick any subject and not worry about what it will cost them.

“In terms of PEF, some of that goes on the kids who are maybe harder to reach. For example, we’ve used PEF to employ a family engagement officer who goes out and actually brings those pupils into school if they’re not here in class.”

Outlining ways in which government support could be improved, she added: “Employing staff is expensive... If you take out what you need for staffing [from your PEF and SAC allocation], you’re left with what some would call the pencil budget.

“Also, we know what funding we’ll get this year, but what will happen after that? Because, when you’re employing staff through these funds, the contracts are temporary... If there was perhaps more permanency about funds such as SAC and PEF, it would make it easier for us to hire and plan.”

Ms Prentice said ensuring pupil welfare during the pandemic was a huge task, not least because of the work involved in putting youngsters through this year’s alternative certification process.

“Every pupil now has either a laptop or an iPad, and we’ve had fantastic support from our partners in the community,” she added. “We have a fantastic mental health worker who has been working tirelessly during the pandemic. We have MyWifi mobile units to ensure connectivity for pupils.

The Herald: Headteacher Norma Prentice and DHT John Johnstone visit the Castlebrae Community Campus construction site.Headteacher Norma Prentice and DHT John Johnstone visit the Castlebrae Community Campus construction site.

“In terms of alternative assessment, we’re breaking our assessments up over a number of weeks... and we’re not doing the big exam-style tests in a sports hall with invigilators. It’s a lot for the pupils in a very short time. Some of them are coming back in after lockdown, having not done much at home, and are then faced with assessment, assessment, assessment.”

James Donald, Future Improvements Coordinator at the school, said changes had been "seismic" since his arrival.

"I came here in 2012 to look after positive destinations," he explained.

"When I arrived, our positive destination rate was 42% and now we’ve had our second year in a row at 100%, with every single school leaver going on to a positive destination such as college, university or a job. I’m optimistic we’ll stay at that level this year.

READ MORE: SNP pledges to publish Curriculum for Excellence review

“Our work is all about relationships. When we talk about ‘16-plus’, we don’t wait until the pupils are 16. We’re working with them from their first day in S1, identifying areas of need, and successes, and supporting them throughout their entire time here. We’re very good at adapting.

"We mould ourselves around the young people rather than the young pupil having to mould themselves around the school."   

The school community is now preparing for transfer to a £28 million campus in the heart of Craigmillar.

“We’re planning a farewell to Castlebrae in November before moving to the new building - which will be called Castlebrae Community Campus - sometime after Christmas,” said Ms Prentice.

“We want to continue to be in the centre of the community and to grow.”