Yes you're right Sam, teachers and parents often say:" If you don't toe the line, there will be serious consequences".
Sports coaches and managers also use this idiom:
Coach: Hey guys, I expect everyone to toe the line when we go interstate for the grand final. We don't want our club to get a bad name.
Manager: It has come to my attention that some of our employees aren't toeing the line and are using company time to send private emails. This has to stop immediately!