Skip to content

Commit

Permalink
fix download bug of correctAnswer
Browse files Browse the repository at this point in the history
  • Loading branch information
dyr429 committed Feb 25, 2024
1 parent a29896a commit 34c63a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/DownloadTidy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function processToRow(session: ParticipantData, studyConfig: StudyConfig, proper
tidyRow.answer = value;
}
if (properties.includes('correctAnswer')) {
tidyRow.correctAnswer = completeComponent.correctAnswer;
tidyRow.correctAnswer = completeComponent.response.filter((r: { id: string; }) => r.id === key)[0]?.correctAnswer;
}
if (properties.includes('taskOrder')) {
tidyRow.taskOrder = session.sequence.indexOf(trialId);
Expand Down

0 comments on commit 34c63a0

Please sign in to comment.