Conventional wisdom among teachers is that ratings are mainly a function of the grades that students expect to receive in the course. I was in the room when two profs were discussing their grading policies, and one of them flat-out wanted to give easy grades because he was coming up on tenure.