Do this on a wednesday:
Walk in the class, pick out the students who were supposed to go to the office, have them stand up, keep em standing, and then explain your displeasure with the classes actions. Tell the class that because the standing individuals seemed to be the instigators, the rest of the class has to write out a sentence 600 times, for the next day. Make it a bit longer, something that on average should take 30 seconds to write. And no computer help. Their entire night will be shot. The people standing don't have to do it though.
Do it again the next day, thursday. Except have the people standing write a one paragraph essay explaining why they are special and shouldn't have to go to the office.
On friday, have the essays read to the class, have the class vote if they liked the essays, and then have them write out a new sentence 1000, 1500 times, no matter what.
Repeat until their wills are broken. Making them copy whole pages from the dictionary/encyclopedia always does wonders too. Oh and their parents have to sign the papers too.