We are the disciplinarian and the mentor. This can be a tough balance.
I've got fabulous children. And I'm sure a great deal of it is luck. But in case it's actually something I've done, I thought I'd share some of the tactics I use to keep things running.
1) I don't tolerate whining. When someone whines, I act like they're speaking a foreign language that I don't understand. "I'm sorry, I couldn't understand what you said. All I could hear was whining." If they repeat the complaint in a whining tone, I suggest how they might say it for them to parrot back. Works every time.
2) I don't tolerate a sullen or cranky attitude. If someone is outwardly negative towards the assignment or work at hand (I do this for shared chores as well) I dismiss them. I'll have them go sit on their bed, or the stairs, until they can join us with a good spirit. The work will be there for them when they are ready for it, they know this. Most times, they are back in 5 minutes or less. Other times they have fallen asleep on their bed. Which tells me that it wasn't just a cranky attitude, they needed a nap. (Note: Cranky Moms can benefit from this procedure as well, but it's not always a good idea for us to take a nap!! - sorry.)
3) If you complain that there too much assigned in a subject (when it's just the same amount as most days) you can expect me to add a couple of questions to the assigned work. And will continue to do so until you stop complaining. I've been know to stop complaining by simply saying: "Really? you want MORE math questions?" They know the drill, that was the only warning they'll get.
4) The punishment should fit the crime. Notice none of these "school related" infractions involve withholding television privileges or time with friends. It can escalate to that when they spend so much time on their bed, or get so many extra Math questions that their school work drags into the evening...but it was a natural consequence of the problem - NOT a case of Teacher-Mom being the bad guy!
All of this, I do with a good spirit. I don't yell or raise my voice. I simply keep order and remind them of how it works. It's up to them to learn to follow protocol and expectations or deal with the consequences of their actions.