Principal stops student from jumping off 17-storey building