An 81-year-old terminally ill woman, whose husband and daughter both died during her studies, has graduated from university.