He wouldn't have gone to school yesterday if he had injured his leg, but we don't know that he has. Has could only refer to injur.
He wouldn't have gone to school yesterday if he had injured his leg, but I don't know if he did. Did leads me to think of "gol" but it could also refer to injur.
to remove any ambiguity:
He wouldn't have gone to school yesterday if he had injured his leg but I don't know if he (has) injured it.
He wouldn't have gone to school yesterday if he had injured his leg but I don't know if he went.