that happened to a mate of mine. The motor works if it moves a bit. Either its come of its tracks or a cable has broke that moves the sunroof.
Best bet is to take the roof lining out, remove all 4 grab handles (2 screws in each), remove your sun visors (1 screw in each), remove the rubber strip around the sunroof, remove the little box by the interior light (pull/slide it back), remove the interior light (clips out), remove your AB&C pillars (these just clips of but dont mix or loose the clips) your roof lining will hang, get someone to help you aswel. And slide it out from the boot (dont bend it as it will just crack/brake) if you want, get some roof lining glue and glue the material back on thats hanging off at the front of at the screen area. 1ce your roof lining is off you will need to remove the sunroof cover. If you push it back you will see a black rubber clip at the back of the sun roof cover, prise this out (theres 1 each side) push the cover up where the plastic handle is gently pull it out. You now have the sun roof motor and mech in front of you. I cant help you further as thats the furthest ive got as i did my roof lining, sorry.
Sharki