From d5a4d9ad5edac911c10db74f1ce95c0b3b7cce97 Mon Sep 17 00:00:00 2001 From: Tom Reijnders Date: Fri, 14 Apr 2023 09:46:30 +0200 Subject: [PATCH] Fix the reporting of category in the dasboard --- website_code/scripts/result.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website_code/scripts/result.js b/website_code/scripts/result.js index 1d7fe4211..d9f9796f7 100644 --- a/website_code/scripts/result.js +++ b/website_code/scripts/result.js @@ -580,8 +580,8 @@ function XTResults(fullcompletion, trackingState) { case "match": // If unique targets, match answers by target, otherwise match by source const targets = []; - for (let j = 0; j < trackingState.interactions[i].nrinteractions; j++) { - targets.push(trackingState.interactions[i].correctOptions[c].target); + for (let j = 0; j < trackingState.interactions[i].correctOptions.length; j++) { + targets.push(trackingState.interactions[i].correctOptions[j].target); } // Check whether values of targets are unique const uniqueTargets = targets.length === new Set(targets).size;