A TEACHER who was so incompetent an entire top set maths class failed a test has lost her latest attempt to win her job back.

Janet Garner, 62, has already been struck off twice by Scotland's regulatory body for teachers, but took her case to Edinburgh's Court of Session.

She told judges that the General Teaching Council for Scotland (GTCS) had acted illegally when it banned her from the profession in November 2013.

However, Lady Paton ruled the GTCS had acted correctly. Refusing her appeal she said: "The findings which they made and the reasons which they gave demonstrate, in our opinion, a thorough and careful approach leading to a demonstrably rational and justifiable result."

Mrs Garner, who taught at Alva Academy and Alloa Academy, in Clackmannanshire, was struck off in 2011, but the ruling was overturned after a court found the GTCS had not properly considered the allegations made against her.

A new panel then looked at the case and decided to strike her off again. Their report stated: "The respondent has fallen significantly short of the standards expected of a registered teacher."

Mrs Garner returned to the Court of Session to argue that the second panel had acted illegally, failed to follow the correct procedures and were biased against her.

But these points were dismissed with Lady Paton stating that there was enough evidence to prove the second panel acted legally.

She said: "We have carefully considered the circumstances of the hearing in this case. We have found nothing to suggest that the panel demonstrated actual or apparent bias."

The ruling is the latest twist in what is believed to be the longest running case the GTCS has ever been involved in and one of the most expensive with legal fees topping £210,000.

A GTC Scotland spokesman said: "We are pleased by the decision of the Court of Session. As the regulatory body for teaching we welcome its decision, which recognises not only the careful way in which the fitness to teach panel considered this case, but also that the outcome was a rational and justifiable result.

"We pursued this case when it would have been easier not to do so because we have a duty to the public and teachers to ensure that the standards for registration are upheld at all times.

"The decision has been found in our favour, but we acknowledge that this has been a lengthy and costly process for our staff and registrants."

The spokesman said it had not yet been decided whether the GTCS would pursue Mrs Garner for costs.

At her original hearing Mrs Garner faced a string of charges relating to rules on teacher competence.

Case presenter Joyce Cullen said test results for Mrs Garner's S3 class at Alva Academy in February 2004 were so poor the "whole class of credit level pupils failed overall".

On another occasion, Alloa's deputy head was observing a lesson in which Mrs Garner made a "basic mathematical error".

Stuart Rycroft, a former deputy head at Alva Academy, said he had never had a teacher who had received so many complaints or needed as much help as Mrs Garner.

Mr Rycroft added: "My initial thought was that I would sit in the class and help to try and create a calmer atmosphere, but it was quite clear that the classroom had become a battleground."

At a hearing in 2011, Mrs Garner was told by the GCTS that she would be removed from the teaching register, after concluding that she "simply could not teach".