db-upgrade MDL-24487 Fixed incorrect parentcontext when upgrading.
[moodle.git] / lib / db / upgrade.php
index bf9d9d7..9f74fb5 100644 (file)
@@ -3616,7 +3616,7 @@ WHERE gradeitemid IS NOT NULL AND grademax IS NOT NULL");
                 // No default exist there yet, let's put a few into My Moodle so it's useful.
 
                 $blockinstance = new stdClass;
-                $blockinstance->parentcontextid = SITEID;
+                $blockinstance->parentcontextid = SYSCONTEXTID;
                 $blockinstance->showinsubcontexts = 0;
                 $blockinstance->pagetypepattern = 'my-index';
                 $blockinstance->subpagepattern = $mypage->id;