Two courses in my Moodle site won't open and present the error message: Invalid repository ID and will not open at all.
Reading Moodle help pages such as https://moodle.org/mod/forum/discuss.php?d=233242 it seems that because the course cannot find one or more files in the Moodle Repository the whole course won't open but there is no easy way to identify the problem files. (On any website surely such a case should not disable a whole page and just the file would not work!) I cannot even delete the course to recreate it as the invalid repository ID error even prevents the course from being deleted.
Can anyone tell me how to simply find the files that are the problem and how to delete them? I cannot access the course pages. I see mention of deleting files from mdl_files_reference in https://moodle.org/mod/forum/search.php?id=5&words=&phrase=invalid+repository+ID¬words=&fullwords=&hfromday=1&hfrommonth=1&hfromyear=1&hfromhour=1&hfromminute=1&htoday=1&htomonth=1&htoyear=1&htohour=1&htominute=1&forumid=&subject=&user= but don't see any guidance as to how to find the file and delete it. I do not know how to add code to anything.