Skip to content

Commit

Permalink
GH-807 prevent duplicate in response data
Browse files Browse the repository at this point in the history
When getting the response data, join on the person params of the
selected $contextid
  • Loading branch information
davidszkiba authored and eynimeni committed Feb 10, 2025
1 parent a524bad commit 8df9632
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion classes/catquiz.php
Original file line number Diff line number Diff line change
Expand Up @@ -587,11 +587,12 @@ public static function get_sql_for_model_input(
$selectability = "";
if ($joinability) {
$selectability = ", lcp.ability ability";
$abilityparams = ['scaleability' => $joinability];
$abilityparams = ['scaleability' => $joinability, 'scalecontext' => $contextid];
$joinabilitysql = <<<SQL
JOIN {local_catquiz_personparams} lcp
ON lcp.userid = qas.userid
AND lcp.catscaleid = :scaleability
AND lcp.contextid = :scalecontext
SQL;
}

Expand Down

0 comments on commit 8df9632

Please sign in to comment.