A Petaluma high school teacher was sentenced in San Mateo County Superior Court this morning to two years in state prison for setting up an illicit date with a person he believed was a teenage girl.Scott Dietlin, 36, a world history and economics teacher at Casa Grande High School, must also register as a sex offender as part of a plea deal reached in April, Chief Deputy District Attorney Steve Wagstaffe said.Under the terms of the deal, Dietlin pleaded no contest to one felony count of arranging to meet with a minor for the purpose of engaging in a lewd act, the most serious charge against him.The plea deal eliminated six other counts related to communicating with a minor for sex, Wagstaffe said.Judge James Ellis denied Dietlin probation at his sentencing this morning. With credit for time served, Dietlin will serve approximately 15 months in prison. He has been held in lieu of$700,000 bail since he was arrested in San Mateo in November after allegedly showing up for a date with “Jackie,” a teenage persona created on MySpace by two teenage San Mateo County boys, Wagstaffe said.The boys posted the online profile as a joke, Wagstaffe said. When Dietlin contacted “Jackie” in April 2008, the boys initially played along, he said.Over time, the communication began to include sexually explicit e-mails and text messages, police said. At one point, Dietlin allegedly sent “Jackie” a naked photo of himself, Wagstaffe said. The boys finally decided to call police.Burlingame officers began posing as “Jackie” and set up a date at a location in San Mateo on Nov. 22, Wagstaffe said. Dietlin showed up that morning and was taken into custody.Burlingame police searched Dietlin’s car and Petaluma home, seizing items including condoms, a computer and a cell phone, police said.