Thanks for your help.
By debugging I found out that the courses had a format plugin that is no longer supported by the current moodle version.
Now it works.
By debugging I found out that the courses had a format plugin that is no longer supported by the current moodle version.
Now it works.