From 4c556ba402f0e0fd5c6b994f0929f094836a8f00 Mon Sep 17 00:00:00 2001 From: PMKuipers Date: Sun, 29 Dec 2024 23:26:57 +0100 Subject: [PATCH] Fix for badge scan SQL issue --- classes/badgeinfo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/badgeinfo.php b/classes/badgeinfo.php index dcacdff..b3c4ae1 100644 --- a/classes/badgeinfo.php +++ b/classes/badgeinfo.php @@ -816,7 +816,7 @@ class badgeinfo { $sql = "SELECT DISTINCT b.id from {badge} b INNER JOIN {badge_criteria} crit ON b.id = crit.badgeid INNER JOIN {badge_criteria_param} p on p.critid = crit.id - INNER JOIN {competency_coursecomp} cc on cc.competencyid = p.value + INNER JOIN {competency_coursecomp} cc on CAST(cc.competencyid as VARCHAR(255)) = p.value WHERE cc.courseid = :courseid AND crit.criteriatype $ctypesql $conditions"; $competencyrelids = $DB->get_fieldset_sql($sql, $sqlparams);