The school at the centre of today's hearing did not support the man's desire to continue suppression.
The man was found guilty last month of committing an indecent act in a classroom at the school during a lunchtime in June 2013.
His teaching certificate is under interim suspension and he is not currently teaching, stepping down when the incident was disclosed.
He had denied masturbating but had conceded watching pornography in an empty classroom at lunchtime. When the court found he had been masturbating, he then disputed that the classroom was a place to which the public had access.
Judge Anne Kiernan then found the classroom was indeed a place that the public had access to, and found the man guilty.
She today sentenced him to nine months supervision, counselling or treatment as appropriate and 80 hours community work.
The incident came to light after a student wanting to speak to him about a timetable change viewed him through a window, when a friend lifted him up to look inside the classroom.
Sitting before the judge alone last month, the court heard how the boy, now aged 17, had liked and respected the teacher prior to the incident.
Afterwards, he was left shocked and "never wanted to speak of it again", a friend said.
The boy gave evidence sitting just metres from the man. He was grilled extensively on the details by defence lawyer Richard Earwaker, who accused him of "making up a story for his mates".
However the judge found the boy was a truthful witness.
Others to give evidence included the school principal, a teacher, a teacher aide, an IT expert and police.
The school's head of IT said a server log showed that the teacher had been accessing Tumblr sites with various URLs.
The man must make an appeal by June 18.