{"id":133,"date":"2020-06-30T19:03:57","date_gmt":"2020-06-30T19:03:57","guid":{"rendered":"https:\/\/standingtech.com\/randomarticles\/?p=133"},"modified":"2020-07-01T10:23:51","modified_gmt":"2020-07-01T10:23:51","slug":"can-not-find-data-record-in-database-table-qtype_multichoice_options-moodle","status":"publish","type":"post","link":"https:\/\/standingtech.com\/randomarticles\/can-not-find-data-record-in-database-table-qtype_multichoice_options-moodle\/","title":{"rendered":"Can not find data record in database table qtype_multichoice_options Moodle"},"content":{"rendered":"\n<p>This is because of buggy questions imported by file import.<\/p>\n\n\n\n<p>1- Run below query and then save the result in text file<br><\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>SELECT t1.id, t1.name<br> FROM mdl_question t1<br>     LEFT JOIN mdl_qtype_multichoice_options t2 ON t1.id = t2.questionid<br> WHERE t1.qtype=&#8217;multichoice&#8217; AND t2.id IS NULL<\/p><\/blockquote>\n\n\n\n<p>2- Then run another query to delete buggy questions by ID<\/p>\n\n\n\n<p>Delete from mdl_question where id in (id1, id2, &#8230;.)<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is because of buggy questions imported by file import. 1- Run below query and then save the result in text file SELECT t1.id, t1.name FROM mdl_question t1 LEFT JOIN mdl_qtype_multichoice_options t2 ON t1.id = t2.questionid WHERE t1.qtype=&#8217;multichoice&#8217; AND t2.id IS NULL 2- Then run another query to delete buggy questions by ID Delete from&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-133","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/standingtech.com\/randomarticles\/wp-json\/wp\/v2\/posts\/133","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/standingtech.com\/randomarticles\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/standingtech.com\/randomarticles\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/standingtech.com\/randomarticles\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/standingtech.com\/randomarticles\/wp-json\/wp\/v2\/comments?post=133"}],"version-history":[{"count":2,"href":"https:\/\/standingtech.com\/randomarticles\/wp-json\/wp\/v2\/posts\/133\/revisions"}],"predecessor-version":[{"id":135,"href":"https:\/\/standingtech.com\/randomarticles\/wp-json\/wp\/v2\/posts\/133\/revisions\/135"}],"wp:attachment":[{"href":"https:\/\/standingtech.com\/randomarticles\/wp-json\/wp\/v2\/media?parent=133"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/standingtech.com\/randomarticles\/wp-json\/wp\/v2\/categories?post=133"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/standingtech.com\/randomarticles\/wp-json\/wp\/v2\/tags?post=133"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}