Teachers warned against corporal punishment