Skip to content

Commit e556fe1

Browse files
committed
updated flanker task
1 parent e80fadf commit e556fe1

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

flanker/experiment.js

+10-11
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ var feedback_instruct_block = {
150150
timing_response: 180000
151151
};
152152
/// This ensures that the subject does not read through the instructions too quickly. If they do it too quickly, then we will go over the loop again.
153-
var instruction_trials = []
154153
var instructions_block = {
155154
type: 'poldrack-instructions',
156155
pages: [
@@ -163,11 +162,9 @@ var instructions_block = {
163162
show_clickable_nav: true,
164163
timing_post_trial: 1000
165164
};
166-
instruction_trials.push(feedback_instruct_block)
167-
instruction_trials.push(instructions_block)
168165

169166
var instruction_node = {
170-
timeline: instruction_trials,
167+
timeline: [feedback_instruct_block, instructions_block],
171168
/* This function defines stopping criteria */
172169
loop_function: function(data) {
173170
for (i = 0; i < data.length; i++) {
@@ -233,16 +230,17 @@ for (i = 0; i < practice_len; i++) {
233230
stimulus: practice_trials.image[i],
234231
is_html: true,
235232
key_answer: practice_response_array[i],
236-
correct_text: '<div class = centerbox><div class = flanker-text>Correct</div></div>',
237-
incorrect_text: '<div class = centerbox><div class = flanker-text>Incorrect</div></div>',
238-
timeout_message: '<div class = centerbox><div class = flanker-text>Response faster!</div></div>',
233+
correct_text: '<div class = centerbox><div style="color:green"; class = center-text>Correct!</div></div>',
234+
incorrect_text: '<div class = centerbox><div style="color:red"; class = center-text>Incorrect</div></div>',
235+
timeout_message: '<div class = centerbox><div class = flanker-text>Response faster</div></div>',
239236
choices: [70, 72],
240237
data: practice_trials.data[i],
241238
timing_feedback_duration: 1000,
242239
show_stim_with_feedback: false,
240+
timing_response: 1500,
243241
timing_post_trial: 500,
244242
on_finish: function() {
245-
jsPsych.addDataToLastTrial({
243+
jsPsych.data.addDataToLastTrial({
246244
exp_stage: "practice"
247245
})
248246
}
@@ -260,16 +258,17 @@ for (i = 0; i < exp_len; i++) {
260258
stimulus: test_trials.image[i],
261259
is_html: true,
262260
key_answer: test_response_array[i],
263-
correct_text: '<div class = centerbox><div class = flanker-text>Correct</div></div>',
264-
incorrect_text: '<div class = centerbox><div class = flanker-text>Incorrect</div></div>',
261+
correct_text: '<div class = centerbox><div style="color:green"; class = center-text>Correct!</div></div>',
262+
incorrect_text: '<div class = centerbox><div style="color:red"; class = center-text>Incorrect</div></div>',
265263
timeout_message: '<div class = centerbox><div class = flanker-text>Response faster!</div></div>',
266264
choices: [70, 72],
267265
data: test_trials.data[i],
268266
timing_feedback_duration: 1000,
267+
timing_response: 1500,
269268
show_stim_with_feedback: false,
270269
timing_post_trial: 500,
271270
on_finish: function() {
272-
jsPsych.addDataToLastTrial({
271+
jsPsych.data.addDataToLastTrial({
273272
exp_stage: "test"
274273
})
275274
}

flanker/style.css

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@
77
-webkit-transform: translateY(-50%);
88
}
99

10-
10+
.responded {
11+
visibility: hidden;
12+
}

0 commit comments

Comments
 (0)