Teacher sacked for corporal punishment