Professor spared jail over assault