Scotland's class of 2020 have got their results, but for the first time in history they will not be based on exams. The coronavirus pandemic led to the closure of schools and an abrupt end to the 2019/2020 academic year.
Pupils in Scotland are the first in the UK to find out their grades. So how have these results been worked out - and what can pupils do if they are unhappy with what they get?
How did pupils do this year?
The nationwide results for all Scottish examinations were higher than last year.
National 5s saw 81.1% of pupils getting an A to C grade compared with 78.2% in 2019. The Higher pass rate rose from 74.8% to 78.9% and Advanced Higher increased from 79.4% to 84.9%.
However, these grades would have been even higher if the estimates from teachers had been taken without moderation.
The Scottish Qualification Authority (SQA) revealed that teacher estimates for Highers were 14 percentage points above last year's results, while National 5s were 10.4 percentage points higher.
Teachers awarded far more A grades than previous years.
Scotland's chief examiner Fiona Robertson pointed out that the SQA accepted almost three-quarters of teacher estimates.
But 124,564 results dropped down a grade when the SQA got involved.
How were the results decided?
The extent of the impact the coronavirus pandemic would have on Scotland's education system became clear in March when schools were closed and exams were cancelled for the first time in history.
Shortly afterwards the SQA announced that coursework would not be marked for National 5, Higher or Advanced Higher courses.
Instead, the exams body said teachers should use their professional judgement to estimate a grade and band for each pupil.
It said this should be a judgement based on all of a pupil's activity over the school year, not just the result of one prelim or one project.
Teachers were told to take account of any available work completed throughout a course, and use their knowledge of that work and a pupil's progress to estimate the grade they would have achieved under normal circumstances.
The existing bands for each subject were subdivided, with teachers asked to place candidates within those narrower bands - and also to rank their pupils in order.
How did the SQA use teachers' estimates?
The SQA "checked and validated" estimates from teachers and moderated them to "ensure consistency across schools and colleges, and with results from previous years".
The exams body looked at each school's previous history of estimating results and attainment.
It developed a maximum and minimum pass rate for each course at every school based on the four-year average but it built in flexibility to account for year on year changes.
For subjects taken by a high number of pupils, such as English, pass rates remain fairly steady over the years so the SQA could more easily predict the distribution of grades from A to C.
But for low uptake subjects such as Gaelic Learners, there was a much wider range accepted for the pass rates because the annual figures were so volatile.
Where schools had made grade awards outside the accepted range, the teacher ranking of pupils were used to decide which students should not fall within the grade.
The SQA claims teachers are very good at making relative judgments between pupils.
It was these rankings that were used to decide whose grade was lowered.
When a school was new to a particular course they had to accept the teacher estimate as there was no historic data.
Were poorer pupils badly affected?
Before the results were released, the Scottish Greens voiced concerns that some pupils from deprived communities could be marked down because of the previous performance of their school.
The SQA said this had not been the case and students from the most-deprived areas had done better than last year and the four-year average.
However, its figures also showed that the Higher pass rate for pupils from the most deprived backgrounds was reduced by 15.2 percentage points, compared with only 6.9 percentage points for the wealthiest pupils.
The qualifications body said that an Equalities Impact Assessment had ensured that, at every stage, the model was designed to check if any group was adversely hit by the method used to calculate grades.
Can grades be appealed against?
There is a free appeals process for those who are given a lower grade than was originally estimated by their teacher or lecturer.
The appeal must include alternative evidence, and should be submitted by the school or college rather than the candidate. It is only possible to review a grade, not a band.
Priority reviews - for those pupils who have a conditional offer for university or college - must be submitted by 14 August. The deadline for all other appeals is 21 August.
The SQA says that the alternative evidence which can be submitted can include any completed coursework which had already been sent to the SQA, as well as coursework which could not be completed.
It can also include prelims or mock tests, class work and commercially-produced question papers - but not past papers which were in the public domain.
The evidence must be from work produced before the 29 May deadline for submitting the estimates. Grades can either be increased, lowered or remain the same.
What about the rest of the UK?
Pupils in England, Wales and Northern Ireland will find out their grades later this month, with A-level results to be published on 13 August and GCSEs on 20 August.
As in Scotland, exams were cancelled this year and teachers were asked to estimate pupils' grades.
The watchdog Ofqual says the number of students getting good grades in England is expected to be 2% higher at A-level and 1% at GCSE this year.
The predicted grades suggested by teachers would have been far higher, but were knocked back down by exam boards.
Students who are not happy with their results will be able to sit exams in all subjects in the autumn.