The Chinese government is strict concerning adherence to its laws and regulations. If a foreign teacher breaks the Chinese laws, they are subject to Chinese punishment, incarceration, and/or deportation, depending on the infraction.
In most cases, embassies are powerless to help the teacher in trouble other than notify family and act as consultant. Breaking Chinese regulations can be as small as not having your Residency Permit in a timely manner (fine is involved) to being involved in a traffic accident where the blame is put on the foreigner (large fines, possible incarceration, probably deportation depending on the circumstances). The foreign teachers should realize that any infraction in their own country is probably an infraction in China.
Foreigners should not participate in any political gatherings and should be aware that underground churches are monitored. Participation can be perceived as breaking the law and arrest can follow. Proselytizing is also not allowed, in or out of the classroom.
If a teacher of Chinese background enters China using only an ID card, they are treated as a Chinese citizen in cases of breaking the law. The embassies have no jurisdiction over that person, even if a citizen of another nation.
If there are questions concerning specific regulations, these should be discussed with the school/institution foreign affairs officer.
(State Administration of Foreign Experts Affairs October 18, 2006)