Leaky Sunroof on 2004 Toyota RAV4

Is there a way to fix a leaky sunroof? The water is somehow going thru to the frame and into the front floorboard on both sides. The local Toyota dealership wants to replace the entire sunroof, at a cost of about 700.00.

Asked by for the 2004 Toyota RAV4
Sunroof repairs are not easy, which is why it can be very expensive. Trying to do this yourself may end up costing you much more than if you had it done by a shop, and that doesn't take into account the time.
What you can do is make sure the drains are not plugged, this you can do. Open the sunroof and slowly poor water along the sides and the water should drain out under the vehicle, if it doesn't and the trough starts filling up, you have a plugged drain that needs to be cleaned out.
You can also try taking this to other repair shops, the dealer is more often more expensive so you may find a better price elsewhere.