A theory for distance education