The modern practice is to establish a "collage" with offices outside the prison that conducts classes inside the prison.
Thus an inmate's transcript shows that he earned his degree (or credits) from "Smith College" instead of "State Prison". Inmates get full scholarships including room and board.