{"id":182,"date":"2012-01-23T23:33:42","date_gmt":"2012-01-23T23:33:42","guid":{"rendered":"http:\/\/danmarsden.com\/blog\/?p=182"},"modified":"2012-01-23T23:33:42","modified_gmt":"2012-01-23T23:33:42","slug":"meta-course-enrolments-and-failed-moodle-2-upgrades-oh-my","status":"publish","type":"post","link":"https:\/\/danmarsden.com\/blog\/2012\/01\/23\/meta-course-enrolments-and-failed-moodle-2-upgrades-oh-my\/","title":{"rendered":"Meta-course enrolments and failed Moodle 2 upgrades oh my!"},"content":{"rendered":"<p>We just upgraded one of our clients sites that makes extensive use of the meta-course enrolment feature combined with &#8216;nosyncroleids&#8217; from 1.9 to 2.2\u00a0 &#8211; they use meta-courses to enrol their students but use manual enrolments for their teachers so the teacher role was set in &#8216;nosyncroleids&#8217; &#8211; during the upgrade these manual enrolments for teachers seem to have been corrupted &#8211; after upgrade the users show as &#8220;enrolled&#8221; using meta-enrolment but don&#8217;t have any roles in their courses. This seems strange as in the 1.9 site they were &#8220;manual&#8221; enrolments.<\/p>\n<p>It looks like Petr Skoda may have fixed this as part of <a href=\"http:\/\/tracker.moodle.org\/browse\/MDL-29684\">MDL-29684<\/a> but this is only fixed in master, not the stable branches. (and I haven&#8217;t tested it)<\/p>\n<p>And unfortunately as the sync process has already screwed up the enrolments on the courses, simply applying the patch to the clients 2.2 site wouldn&#8217;t work &#8211; the only way it seems it might work would be to revert back to the 1.9 site and re-run the upgrade with the patch in place &#8211; or manually go through each course and fix the enrolments. Unfortunately we didn&#8217;t notice this early enough and the site was already being used so the client is now going through each course and manually fixing the enrolments for their teachers (time-consuming and frustrating!)<\/p>\n<p>IMO this sort of issue should be back-ported but hopefully this post might help prevent others from experiencing the same pain!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We just upgraded one of our clients sites that makes extensive use of the meta-course enrolment feature combined with &#8216;nosyncroleids&#8217; from 1.9 to 2.2\u00a0 &#8211; they use meta-courses to enrol their students but use manual enrolments for their teachers so the teacher role was set in &#8216;nosyncroleids&#8217; &#8211; during the upgrade these manual enrolments for [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[3],"class_list":["post-182","post","type-post","status-publish","format-standard","hentry","category-moodle","tag-moodle"],"_links":{"self":[{"href":"https:\/\/danmarsden.com\/blog\/wp-json\/wp\/v2\/posts\/182","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/danmarsden.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/danmarsden.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/danmarsden.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/danmarsden.com\/blog\/wp-json\/wp\/v2\/comments?post=182"}],"version-history":[{"count":2,"href":"https:\/\/danmarsden.com\/blog\/wp-json\/wp\/v2\/posts\/182\/revisions"}],"predecessor-version":[{"id":185,"href":"https:\/\/danmarsden.com\/blog\/wp-json\/wp\/v2\/posts\/182\/revisions\/185"}],"wp:attachment":[{"href":"https:\/\/danmarsden.com\/blog\/wp-json\/wp\/v2\/media?parent=182"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/danmarsden.com\/blog\/wp-json\/wp\/v2\/categories?post=182"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/danmarsden.com\/blog\/wp-json\/wp\/v2\/tags?post=182"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}