Tape seems odd.
That's why I don't think it was intended as "punishment" as much as it was the teacher trying to handle the situation light heartedly. But who knows, she could have been a crusty old mean b*tch just looking to degrade the kids and take total control of the situation while using them as an example for the other little demons. Now that I think about it, yep that's the ticket.
But if it were my kid, I would be asking questions.