Anyone know what would cause the sunroof to start playing up?

It wont auto park any more and it's infuriating. Only the forwards/backwards button works, the 'up' button doesnt do anything anymore.

I seem to remember that pushing the button forwards should always make the sunroof return to the closed position, but instead it closes and just keeps going opening the sunroof into the tilt position!

Any ideas what's causing this?