Skip to content

Randomize Choices issue-not presenting in data #3227

Answered by Shaobin-Jiang
ncuneo711 asked this question in Q&A
Discussion options

You must be logged in to vote

The data property is added at the start of a trial. If you want to add data based on the participant's response in the present trial, you can do it in on_finish:

on_finish: function (data) {
  data.task = 'original_test_trials';
  if (data.response !== null) {
    data.selectedChoiceData = randomizedChoices[data.response];
  } else {
    data.selectedChoiceData = null;
  }
}

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@ncuneo711
Comment options

Comment options

You must be logged in to vote
1 reply
@ncuneo711
Comment options

Answer selected by ncuneo711
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants