The system uses a series of arms and levers and a sensor box to push the glass ahead and up into the vent position.
Unfortunately, the only way to trouble shoot it is to pull the headliner off. Even then there is little you can do to see if anything is wrong without dropping the entire unit.
You can, with the headliner out, remove the glass to see if anything is in the sliding track causing it to jam or is broken. There are 4 screws that hold the glass to the slider mechanism.
If it is anything broken in the sliding mechanism, there is a repair kit vailable from DC, BUT everything is rivetted together, and it is not an easy installation. Full replacement is easier.
One other thought, when the headliner is down, just make sure the motor retaining bolts are not loose - if not, take the motor right off, then run the system; if the motors runs properly, then that of course, eliminates the motor and sensors from the problem.
If a fault shows there, I do have some motors and sensors.
The joys of the sun roof................