From 3d835a1b11aae44daed8cd75d2871a96674c33c1 Mon Sep 17 00:00:00 2001 From: zwatson2001 Date: Fri, 11 Oct 2024 12:29:23 -0400 Subject: [PATCH] get target/answer value from itemLayoutConfig rather than taskStore --- task-launcher/src/tasks/shared/trials/afcStimulus.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/task-launcher/src/tasks/shared/trials/afcStimulus.ts b/task-launcher/src/tasks/shared/trials/afcStimulus.ts index 074ab240..7579a2c9 100644 --- a/task-launcher/src/tasks/shared/trials/afcStimulus.ts +++ b/task-launcher/src/tasks/shared/trials/afcStimulus.ts @@ -403,9 +403,8 @@ function doOnFinish(data: any, task: string, layoutConfigMap: Record f.toLowerCase() === data.keyboard_response.toLowerCase()) : data.button_response; responseValue = response.values[responseIndex]; - data.correct = responseValue === response.target; + target = response.target; + data.correct = responseValue === target; } // check response and record it