Teacher saves student from leaping off building