Do some courts/schools interpret "corporal punishment" as a form of assault/battery?

[Note to posters: Let’s keep this GQ worthy: No debates or heated rhetoric.]
I recently learned corporate punishment still exists in certain US school districts, although the trend is clearly on the down slope.

How can corporal punishment still exist in such a litigious society as ours? Have any courts/school systems ruled corporal punishment tantamount to assault/battery? Does it continue to be employed today because courts grant wide latitude to educators? Any challenges at the federal level?