When a teacher writes an exam, they think about what aspects of student learning they want to test.

There's a pronoun/antecedent error in that sentence.