diff --git a/mod/scorm/db/upgrade.php b/mod/scorm/db/upgrade.php index 0548608bb7d..dbc5b2e9e42 100644 --- a/mod/scorm/db/upgrade.php +++ b/mod/scorm/db/upgrade.php @@ -185,7 +185,7 @@ function xmldb_scorm_upgrade($oldversion) { // Don't bother triggering this next step if the upgrade completed within the last hour. if (time() - HOURSECS > $upgraded) { // Get all attempts that have occurred since the upgrade. - $sql = "SELECT DISTINCT s.*, sa.userid + $sql = "SELECT DISTINCT s.id, sa.userid FROM {scorm} s JOIN {scorm_attempt} sa ON sa.scormid = s.id JOIN {scorm_scoes_value} sv on sv.attemptid = sa.id