Identify the indirect object in the sentence below:
The teacher assigned the class a lot of homework.
Indirect objects usually answer the question "who" or "whom" and are references to persons. Here "class" is the answer to the question "to whom was the homework assigned?", hence Option B is correct. The rest of the options do not adhere to this rule, hence incorrect.