Misleading headline and framing of the dynamic if the teacher only responded physically in self-defense. That also makes the slur not as relevant.
Once he briefly defended himself the teacher had a duty to retreat and notify appropriate personnel. If the student continues the attack of course he can defend himself.
Slapping the kid around when he was on the floor and clearly giving up is what is going to get him.