Ответ:

8. When I opened the door of the classroom, I saw that the teacher was writing a dictation.