{"id":265,"date":"2014-10-03T14:11:00","date_gmt":"2014-10-03T14:11:00","guid":{"rendered":"https:\/\/www.geekmungus.co.uk\/?p=265"},"modified":"2022-11-05T10:53:19","modified_gmt":"2022-11-05T10:53:19","slug":"moodle-2-5-error-cannot-find-data-record-in-database-table-course_module","status":"publish","type":"post","link":"https:\/\/geekmungus.co.uk\/?p=265","title":{"rendered":"Moodle 2.5 Error: &#8220;Cannot find data record in database table course_module&#8221;"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">You get this error when opening a course, in this case we were using course 33. When entering the course, you get this error message:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&#8220;Cannot find data record in database table course_module&#8221;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">http:\/\/moodle.domain\/course\/view.php?id=33<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">SOLUTION:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Open MySQL Workbench on the server and then run this query:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>select modinfo from mdl_course where id = &lt;courseid>;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then you should see the course record in the database, you need to clear the modinfo field that appears to force a cache refresh of the course to do this run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>update mdl_course set modinfo='' where id = &lt;courseid>;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Once this is run try accessing the course again, you should find you can get in again.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You get this error when opening a course, in this case we were using course 33. When entering the course, you get this error message: &#8220;Cannot find data record in database table course_module&#8221; http:\/\/moodle.domain\/course\/view.php?id=33 SOLUTION: Open MySQL Workbench on the server and then run this query: Then you should see the course record in the &#8230; <a title=\"Moodle 2.5 Error: &#8220;Cannot find data record in database table course_module&#8221;\" class=\"read-more\" href=\"https:\/\/geekmungus.co.uk\/?p=265\" aria-label=\"Read more about Moodle 2.5 Error: &#8220;Cannot find data record in database table course_module&#8221;\">Read more<\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-265","post","type-post","status-publish","format-standard","hentry","category-general"],"_links":{"self":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/265","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=265"}],"version-history":[{"count":1,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/265\/revisions"}],"predecessor-version":[{"id":1449,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/265\/revisions\/1449"}],"wp:attachment":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=265"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=265"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=265"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}