Greetings,
Teachers never know what grades their students are going to get. They can have a pretty good idea, but all kinds of things can change on the day of the test. That's very different from the foreknowledge that god is said to have.
Peace
Ya, ok, the example wasn't that good, but lets say the teacher had a superpower to know what all the students would get. Some would get A's, and some would get F's. If the teacher just gave them the grade without testing them then it wont be fair and the students with the F grade will be like "you didn't even give us a chance."