The conviction of Luke Mitchell for murdering Dalkeith schoolgirl Jodi Jones has prompted the leader of Scotland's largest teaching union to call for a bolstering of teachers' rights to search pupils if they suspect that they are carrying dangerous or suspicious objects.
Ronnie Smith, general secretary of the Educational Institute of Scotland, was reacting to evidence heard in the 42-day trial that Mitchell had been an obsessive collector of knives, with one pupil claiming in court that he even took knives to school.
Mr Smith said: "Things have got to the point where teachers would hesitate to require pupils to turn out their pockets for fear of breaching their right to privacy under human rights laws. The position is now that they have to be ultra-cautious."
He called for a fresh look at "the balance of rights of the teacher to exercise discipline and the rights of an individual to privacy and not to be subjected to anything they don't want to be subjected to".
Mr Smith added: "We should not rush to change things on the back of one case. But if a pupil is suspected of possessing something stolen or something dangerous or illegal, I think teachers should have clarity about what they can legitimately do.
"I am not advocating random searches but, where there is suspicion of a pupil being in possession of something like this, a teacher really ought not to be having to phone the pupil's parents to come in to supervise a search."
Donald MacKay, Midlothian's director of education, said: "If there was a suspicion that a pupil was carrying a knife, staff would take immediate action. Pupil and staff safety is paramount."
The EIS, the Headteachers' Association of Scotland, and Midlothian Council have all leapt to the defence of St David's High - where both Mitchell and Jodi Jones were pupils - in the face of media coverage of alleged discipline problems.
Referring to claims made in court that Mitchell had not only dealt in drugs but also smoked cannabis during the school lunch break, Bill McGregor, general secretary of HAS, said: "This gang, who were allegedly smoking huge amounts of cannabis day and daily, were they then going back to school or were they persistent truants? I don't know the answer to that."
He added: "I am not convinced that there is a huge drugs issue in schools.
I am certain there is a huge drugs issue in the community which extends to the school gate. But so far, schools in Scotland have been relatively successful in containing it at the gate and not letting it into the school."
Meanwhile, Midlothian's director of education has responded to what he called "a number of inaccuracies" reported in the media about St David's after the verdict.
Mr MacKay said: "On legal advice, I cannot discuss an individual's educational record and my comments must therefore deal with generalities and not specific incidents."
Referring to allegations that the school took no action in relation to certain pupils' behaviour, Mr MacKay continued: "When four pupils were found in possession of a small amount of cannabis in 2001, on that occasion, following the school's own procedures, the police were called and the pupils were excluded from the school.
"But at the same time, we involved the relevant agencies and their parents to try and ensure these pupils had a better future, which did not involve drugs.
"It was suggested that they should have been permanently excluded. I would respond by saying that, if their subsequent behaviour had merited it, then they would have been. But we make these decisions based on the facts and the evidence available to us. If there is criminal behaviour involved, the police are called."
Mr MacKay said that, had there been any evidence of drug-dealing or use in school by any pupils, this would have been dealt with immediately in line with the school's own policy. "Drug misuse is a huge concern to us all.
Staff from St David's have attended drug training sessions and continue to provide drugs education to pupils and provide parents with details of the drugs education programme so that they can be involved in advising and supporting their children.
"Activity by pupils outwith the school involving inappropriate behaviour is not the responsibility of school staff."
After the evidence in court of Luke Mitchell's sexual behaviour, Mr MacKay said that St David's, like all Catholic schools, promotes abstinence from sexual activity for its pupils. He also underlined the school's promotion of Christianity and religious observance, also in response to court evidence about Mitchell's Satanic and devil-worshipping tendencies.
Headteacher Marian Docherty would not comment on the case. In a statement issued by the council, she said that, at an appropriate time, St David's would remember Jodi, and other pupils who had died, in a memorial garden.
She also paid tribute to the support offered to St David's from the school's chaplaincy team and deanery parishes, Cardinal Keith O'Brien, leader of the Catholic Church in Scotland, and Midlothian Council.