I know there are a few others around here who have X5s so I'm betting there's a decent chance some of you have had the panoramic sunroof break on you. And if not, I hate you, you lucky bastid.
Like many, many others on the 'net, the back portion of my wife's sunroof would not close after opening to the vented position. After much searching, I found a guide on how to mechanically disconnect the rear glass to allow the rest of the sunroof to function as usual. The "fix" is actually an irreversible modification to a portion of the cable drive mechanism, but since the actual fix would cost thousands of dollars (replacing the entire cassette), & the sunroof was effectively inop as-is, I wasn't too concerned.
The procedure was surprisingly simple & straightforward: manually crank open the sunroof, remove a retaining spring & guide bar, use some sort of cutting tool (e.g. Dremel) to remove a triangular tab on the drive cable plate, repeat on the other side, then reinitialize the sunroof's range of motion.
EDIT: And here is the post with a link to the guide.