I think that I have to disagree because
All people are different and they have different abilities to learn and understand the given subjects.
Some students have to spend many hours studying a subject.
At the same time, other students need half an hour to deeply understand the given lecture.
To sum up, I think that teachers should be paid according to the quantity of hours given and the grades received from the students.
From my everyday experience and observation the quality of the lectures given by the teacher often does not reflect how much a student learn or wants to learn.