From 74919fa156283a32427f1f9f699aa11f75426b40 Mon Sep 17 00:00:00 2001 From: Tim Hunt Date: Fri, 15 Jun 2012 17:01:18 +0100 Subject: [PATCH] MDL-26892 questions: images lost during upgrade. This affects questions shared in the system or course category areas of the question bank. Thanks to Chris Edwards for working out what was going wrong. --- lib/db/upgrade.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index 774fe5abdec52..15aad8923a293 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -5034,7 +5034,8 @@ function xmldb_main_upgrade($oldversion) { break; case CONTEXT_COURSECAT : case CONTEXT_SYSTEM : - $context = get_system_context(); + // Stored in the front-page course. + $context = get_context_instance(CONTEXT_COURSE, get_site()->id); break; default : continue;