Yes it sounds good well done.
You could also say "I like teachers who are fair to every student, whether they get high or low grades" which sounds more natural but your sentence is very good also! (also: "I like teachers who are fair to every student, whatever grade they get").