Check all fuses, under bonnet and under dash.
There is an emergency closing procedure for the sunroof, by removing the roof interior light/trim, it uncovers an allen key hole, which leads directly into the motor and simply by turning this, the sunroof should close.
The allen key should be in the tool kit.
There should be 2 different modules, a roof central module and the general module is in charge of windows.