Most of the time when your sunroof stops working it's because a plastic clip to the front, mounted on each side breaks.
The clips are available (I carry a set of 3) from Land Rover at a reasonable price.
Replacement requires sunroof glass to be removed and at the same time inspection and lubrication of moving parts is ideal.
When lubricating these parts use a silicon based spray, anything heavier seems to gum things up and tends to cause more problems, the rails are made of aluminium and so are some of the other parts.
The bits that break causing your sunroof to tilt open on one side are made of plastic and are not repairable in any way.
The only solution here is a total removal of the sunroof mechanism to determine what went wrong, most of the time its quicker and cheaper to source a good second hand mechanism from a breakers yard.
The drain tubes are well secured but where they terminate at the drain end is a concern point.
The clear plastic pipe is merely popped into the rubber tip end, this drain piece blocks up and
yes you get the picture, water starts entering the car.
However a simple snip off the ends, securing properly into drain end with tape will ward off any
future blockage (see pic below)