This is not ok and I say this as a teacher. If you witnessed this you need to report it to the school principal. Swearing and verbally abusing kids is not on and not allowed by schools or education departments, no matter what the circumstances. Please let the principal know ASAP so action can be taken. This teacher needs to be pulled up and fast.