From 01de485dde7cc6c19b901b93bb6c46fa8655b3b4 Mon Sep 17 00:00:00 2001 From: Tim Hunt Date: Wed, 11 Nov 2009 17:01:12 +0000 Subject: [PATCH] blocks upgrade: MDL-20820 another blocks upgrade problem with sticky blocks Even though the visible column is going to be dropped, we need to set it here or the query at line 2087 will fail. Huge thanks to Oleg Sychev who did all the debugging and testing for this fix. --- lib/db/upgrade.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index d281ce0760..fb0e7c0ba4 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -2043,6 +2043,7 @@ WHERE gradeitemid IS NOT NULL AND grademax IS NOT NULL"); $newblock->defaultregion = $newregions[$stickyblock->position]; $newblock->defaultweight = $stickyblock->weight; $newblock->configdata = $stickyblock->configdata; + $newblock->visible = 1; $DB->insert_record('block_instances', $newblock); } -- 2.39.5