A statement to police by the school's head of information technology was read in court by Crown prosecutor Nick Webby. He said he accessed the server log for the teacher's computer and gave it to the police.
The server log showed that over lunchtime from 12.26pm to 1.12pm the teacher had been accessing Tumblr sites with various URLs.
Mr Richards said that in an interview, the teacher did not deny he had accessed the Tumblr sites, but said they could have been 'pop-up' sites.
The teacher resigned after the boy made the allegation and was then suspended by the Teachers Council a month later.
The man's name is suppressed, although the school does not support his desire to keep his identity secret.
The defence disputes the allegation that the act took place in public and has indicated that if the judge finds the charge has been proven, it will argue that the teacher had a reasonable expectation of privacy.