From e80cfb843894c3d5eb22fb99bd622a9b2e3db872 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Sun, 27 Jun 2010 09:30:59 +0000 Subject: [PATCH] MDL-22943 fixed enrol upgrade problem, credit goes to Matt Campbell --- lib/db/upgrade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index b90de0d6e79..2555d1747b2 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -4404,7 +4404,7 @@ WHERE gradeitemid IS NOT NULL AND grademax IS NOT NULL"); // after reconfigured, uninstalled or borked enrol plugins, // unfortunately this may be a bit slow - but there should not be many of these $sqlempty = $DB->sql_empty(); - $sql = "SELECT DISTINCT c.id AS courseid, ra.enrol, e.timecreated, c.timemodified + $sql = "SELECT DISTINCT c.id AS courseid, ra.enrol, c.timecreated, c.timemodified FROM {course} c JOIN {context} ctx ON (ctx.instanceid = c.id AND ctx.contextlevel = 50) JOIN {role_assignments} ra ON (ra.contextid = ctx.id AND ra.enrol <> '$sqlempty') -- 2.43.0