Every now and then in my high school, the admins tried to push the envelope of their authority far beyond its legitimate bounds. These attempts included things like ORDERING students not to call & talk to local radio shows about school policy, even from home. (It would have had to be from home or somewhere off campus, as this was before cell phones and the school had no public or pay phones.) Or ORDERING students to account for their time when away from school or any school sponsored event. Sometimes students (I was one) were ORDERED to show up on Saturday to try out for a sports team, whether we wanted to or not, even though many of us had weekend jobs.
When that happened, the student response was what I'd term "nonviolent noncompliance." We simply refused en masse to follow their dictates.
An order to "smile" like the one in the OP would have resulted in frowns and mass refusal to accept detention or any other punishment.