What is the version of the following sentence with correct punctuation?

He was promoted to associate professor in 1909 but he left Johns Hopkins when offered a full professorship at the University of Illinois at UrbanaChampaign in 1918
He was promoted to associate professor in 1909 but he left Johns Hopkins when offered a full professorship at the University of Illinois at Urbana-Champaign in 1918.