TORONTO -- Teachers should resolve their dispute over pay with the governing Liberals in court, not by depriving students of extracurricular activities, Premier Dalton McGuinty said Tuesday.

Ken Coran, president of the Ontario Secondary School Teachers' Federation has been quoted as saying that he won't rule out withdrawing from voluntary activities for two years -- the length of a new collective agreement the province can impose on public school teachers.

McGuinty said he doesn't understand why teachers are involving students in their dispute over money stopping voluntary activities and staging one-day strikes.

"It's one thing for teachers to withdraw their goodwill from us, but it's another thing to withdraw the goodwill from students," he said.

"I think students have to be able to count on those extracurricular activities. They are such an important part of an enriched educational experience."

But he said he won't make extracurricular activities mandatory.

"You can't pay for goodwill," McGuinty said. "You can't legislate goodwill."

The Progressive Conservatives say they'd consider making the activities mandatory.

"I think that we need to look at that and do something about it," said education critic Lisa MacLeod.

The unions say the job action isn't about pay, but a protest over Bill 115 because it violates their constitutional rights. Four unions have joined forces to take the government to court over the legislation.

McGuinty said a deal is still possible before the end of the year, since his government managed to strike an agreement with Ontario doctors after a "bumpy and very rocky road" over pay which also sparked a lawsuit. It also reached a deal with Catholic and francophone teachers this summer.

If teachers don't reach local deals with their school boards by Dec. 31, the province will impose one that will freeze the wages of most instructors and cut their benefits, such as the number of sick days they're allowed to take each year.

Instead of involving students in the dispute, teachers should leave it to be settled in the courts, he said.

"Don't deprive Ontario students of everything that you bring to the table every day, what you've brought to the table every day during the course of the past nine years," McGuinty said.

"Keep that going. Bring that to schools every single day."

The self-described "education premier" who once boasted of maintaining labour peace in Ontario schools dismissed the notion that the current strife wasn't the legacy he wanted to leave as he exits the top job.

McGuinty is stepping down as premier at the end of January, once a new Liberal leader is chosen.

"It's not about anybody's legacy, it's about doing the right thing today for students and for teachers and for education in Ontario," he said.