Correct option is B
The students were given the assignments by the teacher. This option correctly rephrases the active sentence into passive voice, shifting the focus from the actor (the teacher) to the recipients of the action (the students).
Grammatical rule used: In passive constructions, the object of the active sentence becomes the subject of the passive sentence, and the main verb is accompanied by an appropriate form of the verb "to be" followed by a past participle.
Past indefinite
Subject + V2 + object. -> <- Object + auxiliary verb (was, were) + past participle + by + subject. Example: The books were distributed to the children by the librarian.