From 590822f16fd3830c66a227c4b843e7c8646fe0eb Mon Sep 17 00:00:00 2001 From: Jun Pataleta Date: Wed, 29 Nov 2023 18:30:52 +0800 Subject: [PATCH] MDL-79967 mod_scorm: Use only the required field for the query --- mod/scorm/db/upgrade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/scorm/db/upgrade.php b/mod/scorm/db/upgrade.php index 4ad3fc9d6b1..d646aad0793 100644 --- a/mod/scorm/db/upgrade.php +++ b/mod/scorm/db/upgrade.php @@ -169,7 +169,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