Holyrood's inquiry into pupil motivation turned into a session on teacher motivation last week.
MSPs on the parliamentary education committee had summoned four "front-line" practitioners to inform their deliberations, during which rapid unanimity emerged that schools must have effective leaders and a good ethos if teachers and, in turn, pupils were to feel motivated.
While there was general agreement that social surroundings were a factor, Vicki Aldridge, a teaching fellow at Moray House on secondment from Roseburn primary in Edinburgh, suggested that staff have to feel part of a team to be motivated.
Don Ledingham, headteacher of Dunbar Grammar, said that trust was the key factor. Bryan McLachlan, a principal teacher at Netherlee primary in East Renfrewshire, said a good ethos rubbed off on children as well as staff.
Mr Ledingham said the first step was to "challenge the critical mass" among the staff if there was a negative attitude. "You can often point to individuals who influence that negativity and, when you investigate, you often find that it is because of how they have been treated by managements in the past. Once that has been addressed, you can move on to create a more positive culture."
The Dunbar Grammar head disagreed with Robert Brown, the committee convener, who suggested that leadership was an extra ingredient in addition to being a good teacher. "The characteristics of being a good class teacher are exactly the same as those for being a good headteacher, because you are caring for people," Mr Ledingham said. "It's just that you are moving from the micro to the macro level."
Mr McLachlan said leadership was about taking "brave decisions" for the school and taking the pressure off staff.
Mr Ledingham, with Judith McClure, head of St George's School in Edinburgh, called for more work to be done to spot future school leaders. His neighbour's job with IBM was talent identification throughout Europe and that should be applied in education, instead of appointments to the top jobs being left to chance.
Mr Ledingham also suggested that headteachers should be put on fixed-term contracts and, in return, paid a lot more.
The committee was told that more should be done to help demotivated teachers. Mr McLachlan felt there was no proper system to do that. Ms Aldridge said the problem should be picked up in teachers' annual reviews.
Dr McClure said the key to motivating teachers was to value them and give them opportunities to develop. "If there is a demotivated teacher in my school, it is my fault. If teachers are finding it difficult to cope, it is often difficult for them to admit it. So the answer is to make sure your school is an open community where people can admit their difficulties."
There should be opportunities to teach in other schools, to share best practice and to see practice in other countries. "Visiting places like Finland should not just be for ministers and headteachers."
Mr McLachlan said: "I fail every day - that is the reality of teaching, when you can't get to grips with a particular child or a particular class."
He agreed with the importance of having an open school where a teacher can feel able to go to the head and say: "I'm not coping here." If teachers do not cope, he said, they become demotivated and that has a knock-on effect on pupils.
Mr Ledingham suggested teachers should have the chance to meet together more often, not just at social events but on trips abroad and during extra-curricular activities, which were as important for staff as for pupils.
But he pointed out there was a difference between "someone lacking motivation and some who is failing as a teacher".
When the committee returned to its official theme of pupil motivation, Dr McClure said the critical factor was the quality of the individual teacher's contribution to the development of the individual pupil. Class size can matter in allowing time to support pupils but "what is absolutely fundamental is the commitment of the teacher, that burning commitment, to get to know and support every single pupil in the class".
She added: "If you think you can do something, you will do it. But young people need a lot of support and time. This is particularly so for girls who can be very diffident, even in a school like St George's."
Ken MacIntosh, a Labour member of the committee, noting that St George's is an independent, asked how it was possible to motivate youngsters who are not top of the class "in a school where top of the class is everything".
Dr McClure responded emphatically: "Top of the class is not everything.
People's targets are their own targets, and what matters is the contribution they make and the feeling that they belong to a school community which has shared values."
The committee heard from leaders of the four teaching unions that there were social as well difficulties as well in motivating pupils.
David Eaglesham, general secretary of the Scottish Secondary Teachers'
Association, said the major difference from previous generations was that there is now "a whole alternative lifestyle and culture out there which was not there before, when going down to the local chippie might have been the height of people's ambitions".