“The Office” co-exec producers Lee Eisenberg and Gene Stupnitsky are mining the classroom for laughter, as Columbia Pictures has purchased their feature spec script “Bad Teacher.”

Story follows a foul-mouthed, gold-digging seventh-grade teacher who’s dumped by her sugar-daddy boyfriend and turns her attention toward a colleague. That pits her against a rival who happens to be the school’s model teacher.

Jimmy Miller will produce.

“Bad Teacher” puts the scribes back in business with Sony, where they teamed with Harold Ramis to write “Year One.”Miller most recently produced the summer comedies “Step Brothers” for Columbia and “What Happens in Vegas” for Fox; he was exec producer on “Get Smart” for Warner Bros. Miller recently wrapped the Will Ferrell starrer “Land of the Lost” for Universal.

The scribes are repped by WMA.