The correct answer is B. Yolanda said that she has to leave the class before 12:30 p.m.
The other options are incorrect because they do not accurately reflect what Yolanda said. Option A is incorrect because it uses the first-person pronoun “I” instead of the third-person pronoun “she.” Option C is incorrect because it uses the past tense verb “had” instead of the present tense verb “has.” Option D is incorrect because it uses the perfect tense verb “has had” instead of the simple present tense verb “has.”
Yolanda’s statement is in the present tense, which indicates that she is currently obligated to leave the class before 12:30 p.m. The other options are in the past tense or perfect tense, which would indicate that Yolanda was obligated to leave the class at some point in the past or that she has been obligated to leave the class for an extended period of time.