Professor Pamela Munn, dean of education at Edinburgh University, told a Cosla seminar on inclusion this week: "If you are a middle-class child who does not attain very well, it does not affect you as much as if you are a working-class child."
On the one hand, she told directors of education and headteachers, they could not take their eye off the ball of attainment. On the other, if they wanted to promote social inclusion, the best way was by promoting social cohesion.
The Scottish Executive's Curriculum for Excellence programme had looked very carefully at the key purposes of school and had concluded that it was not to produce scientists or historians but "well-rounded human beings who have a sense of social commitment and responsibility to each other", she said.
But Professor Munn warned that promoting values in the classroom had implications for teacher training. "There is a very important training issue, which is about how well equipped teachers feel to deal with values issues in the curriculum and the teaching of controversial subjects."
Accountability systems were well-developed for attainment, but not as well-honed for reporting on the other national priorities in education.
Schools should measure their promotion of social inclusion, but use "smarter" rather than "more" accountability. However, Bill McGregor, general secretary of the Headteachers' Association of Scotland, expressed major reservations about heads being made even more accountable.
Professor Munn also warned of increasing moves, already evident in the USA, towards seeing SEBD (social, emotional and behavioural difficulties) as a medical or psychological disorder.
"If you look at the American catalogue or list of different kinds of behavioural difficulties, they range from ADHD to oppositional defiance disorder. There are 30 of them on the list.
"One of the things we need to be very cautious about is this increasing medicalisation of naughtiness because it removes individual and collective responsibility for our behaviour," said Professor Munn.
Later, delegates heard from Karen Sutherland, 18, the first physically disabled pupil to attend Leith academy in Edinburgh.
Miss Sutherland, who hopes to go on to college and then university to study film and media, said inclusion meant "feeling accepted and being able to participate not just in the physical sense but also to the point where my disability is not an issue with my friends".
Before her mainstream secondary, she went to a special school. "I think the special school helped me but it didn't give me much academic progress - I didn't feel challenged. Being in a mainstream school, you are with people who are more representative of the world. I feel I am much more prepared and ready for work and being an adult," she said.