Ok, well I had to resort to some programming help to get it fixed. Apparently the mdl_files_reference table was corrupted. Had to rebuild all the file references though.
Repositories
Repositories not working and courses dissapeared
This discussion has been locked so you can no longer reply to it.