I think both A and D are correct English, but D is a better choice.
A is only correct if "the class" is referring to the time period when class is held, rather than the students who make up the class. "He gave a tough assignment for Wednesday." "For" refers to when the assignment is due. In A, the assignment is due at the time of "the class." Unless the class is only meeting one time, this would not be a good sentence to use as is. D is the correct answer.