Solution:(d) The students were not allowed to leave the lecture by the teacher. (Correct)(a) The students are not allowed to leave the lecture. (Incorrect Tense)
(b) The students had not been allowed to leave the lecture by the teacher. (Incorrect Helping Verb)
(c) The students had not allowed the teacher to leave the lecture. (Incorrect Sentence Structure)