Oscillations of a string on an elastic foundation with space and time-varying rigidity