A New Jersey teacher was accused of bringing politics into the classroom in the form of an anti-Trump t-shirt. While the legality of the matter is up to the courts, this situation does raise an interesting moral problem about the free speech of public educators. As a professor at a state university, I am both an educator and a public employee, so this matter is relevant to me.
One aspect of the moral concern is that the educator is a public employee and thus paid by the taxpayers and working in a public institution. While being employed by the state does not strip a person of their right to free expression, there are limits to this right. The most common example of a limit is, of course, about yelling fire in a theater when there is no fire.
Since public employees are paid by the taxpayers to do a job, it makes sense that they do not have the right to express their own political views to the public while on the clock. To use the obvious analogy, it would be absurd to claim that I have the right to try to sell my students my books during class time or office hours. Likewise, it would be absurd to say that I have the right to try to sell my politics to my students during class time or office hours. There is also the matter of professionalism—while I am on the clock, I am representing my institution and not myself. As such, I am obligated to distinguish between my own views and those of the institution.
It might be objected that elected public officials routinely use their offices to engage in political activities that benefit themselves and their party. As such, it is unfair to deny the same opportunity to other public employees. One obvious counter is that elected public officials are politicians, so politics is their job. That said, there are certainly moral concerns about politicians using public resources to campaign for their re-election or the elections of others; but this is more a matter of the use of public funds than a free-speech issue. As such, it seems morally acceptable to insist that public employees who do not hold political office, etc. to refrain from political activities while on the clock. But perhaps being an educator makes a difference.
On the one hand, it could be argued that even in political classes the educator does not have the right to preach their own politics to the students. After all, the function of the educator is to teach rather than preach. If a teacher takes a clear stance on a political issue, then students are pressured to accept (or at least act as if they accept) that view—especially if it somehow makes it into the grading process. There is also the concern that expressing political views will alienate students and thus harm their education. For example, a teacher who expresses anti-Trump views strongly in class, can create a hostile learning environment for students who like Trump (or simply dislike having their class politicized). The teacher has plenty of time outside of the classroom to express their views to people who are free to ignore them or speak back as equals; using class time to engage in politics would thus be wrong.
On the other hand, it can be argued that educators do not surrender their right of free expression and if they use it responsibly in the classroom, they have the right to express their political views. This view does have considerable appeal at the college level—professors are supposed to have positions on intellectual and academic issues, and these include political issues. This does become a matter of teaching/educational philosophy. One classic ideal is the professor as professor—advancing their positions on the academic issues and inviting students to engage them. Of course, this does involve the obvious problem with the power disparity and grades. Another classic ideal is the professor as neutral shoveler of theories and ideas—laying out all the various positions and letting the students decide which they like best. One problem with this is that such an approach does not help the students determine which theories and ideas are better—which would be an obvious problem in the context of engineering, math and science classes in which it is often assumed there must be a right answer that the professor is to convey to the students. This, of course, leads into the jungle of the dispute over which subjects are objective and which are not—a jungle far beyond the itinerary of this brief essay.
My practical solution to the problem in my own classes is to avoid endorsing/condemning any candidate (and not just because this would probably get me fired) and to stick to the general issues of politics. Since I do not want my students to simply repeat what they think I think on papers and tests, I am careful to present the positions fairly. If pressed for my opinion in class, I will refer to any writings I have done on the issues and note that they should not simply accept what I say. I also carefully point out that paper grades are not based on whether I like their position or not but based on how well they argue for their position. When I use examples of politicians (usually for fallacies and rhetoric) I do try to include examples across the spectrum. However, the party in power does tend to be the subject of more examples than the party out of power—which is to be expected.