The radiation of relativistic charged particles for quasiperiodic motion in a transparent medium is considered. For motion of the general kind the differential probability of the process is obtained. For planar motion the spectral intensity of the radiation is found. Different cases of radiation in medium-filled undulators are studied. In particular, the influence of Cherenkov radiation on the undulator radiation is discussed.