diff --git a/task-launcher/src/tasks/math/trials/sliderStimulus.js b/task-launcher/src/tasks/math/trials/sliderStimulus.js index a4b269d7..7130f017 100644 --- a/task-launcher/src/tasks/math/trials/sliderStimulus.js +++ b/task-launcher/src/tasks/math/trials/sliderStimulus.js @@ -237,6 +237,7 @@ export const slider = { response: _toNumber(response), responseType: responseType, distractors: stimulus.distractors, + corpusTrialType: stim.trialType, // slider_start: stimulus.item[1] === 1 ? sliderStart / 100 : sliderStart, slider_start: sliderStart, }); diff --git a/task-launcher/src/tasks/same-different-selection/trials/afcMatch.js b/task-launcher/src/tasks/same-different-selection/trials/afcMatch.js index 6afdc5fe..e1529bfa 100644 --- a/task-launcher/src/tasks/same-different-selection/trials/afcMatch.js +++ b/task-launcher/src/tasks/same-different-selection/trials/afcMatch.js @@ -105,7 +105,7 @@ export const afcMatch = { // save data jsPsych.data.addDataToLastTrial({ corpusTrialType: stim.trialType, - answer: stim.answer || "No answer provided", + answer: stim.answer || null, response: selectedCards, distractors: stim.distractors, item: stim.item, diff --git a/task-launcher/src/tasks/shared/helpers/initTrialSaving.js b/task-launcher/src/tasks/shared/helpers/initTrialSaving.js index e93162f9..02ae12f0 100644 --- a/task-launcher/src/tasks/shared/helpers/initTrialSaving.js +++ b/task-launcher/src/tasks/shared/helpers/initTrialSaving.js @@ -36,8 +36,9 @@ export const initTrialSaving = (config) => { delete dataCopy.keyboard_response; delete dataCopy.response_source; dataCopy.responseSource = data.response_source; - delete dataCopy.trial_index; delete dataCopy.trial_type; + dataCopy.trialIndex = dataCopy.trial_index; + delete dataCopy.trial_index; if (config.isRoarApp) { config.firekit.writeTrial(dataCopy, computedScoreCallback);