@@ -150,7 +150,6 @@ var feedback_instruct_block = {
150
150
timing_response : 180000
151
151
} ;
152
152
/// 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 = [ ]
154
153
var instructions_block = {
155
154
type : 'poldrack-instructions' ,
156
155
pages : [
@@ -163,11 +162,9 @@ var instructions_block = {
163
162
show_clickable_nav : true ,
164
163
timing_post_trial : 1000
165
164
} ;
166
- instruction_trials . push ( feedback_instruct_block )
167
- instruction_trials . push ( instructions_block )
168
165
169
166
var instruction_node = {
170
- timeline : instruction_trials ,
167
+ timeline : [ feedback_instruct_block , instructions_block ] ,
171
168
/* This function defines stopping criteria */
172
169
loop_function : function ( data ) {
173
170
for ( i = 0 ; i < data . length ; i ++ ) {
@@ -233,16 +230,17 @@ for (i = 0; i < practice_len; i++) {
233
230
stimulus : practice_trials . image [ i ] ,
234
231
is_html : true ,
235
232
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>' ,
239
236
choices : [ 70 , 72 ] ,
240
237
data : practice_trials . data [ i ] ,
241
238
timing_feedback_duration : 1000 ,
242
239
show_stim_with_feedback : false ,
240
+ timing_response : 1500 ,
243
241
timing_post_trial : 500 ,
244
242
on_finish : function ( ) {
245
- jsPsych . addDataToLastTrial ( {
243
+ jsPsych . data . addDataToLastTrial ( {
246
244
exp_stage : "practice"
247
245
} )
248
246
}
@@ -260,16 +258,17 @@ for (i = 0; i < exp_len; i++) {
260
258
stimulus : test_trials . image [ i ] ,
261
259
is_html : true ,
262
260
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>' ,
265
263
timeout_message : '<div class = centerbox><div class = flanker-text>Response faster!</div></div>' ,
266
264
choices : [ 70 , 72 ] ,
267
265
data : test_trials . data [ i ] ,
268
266
timing_feedback_duration : 1000 ,
267
+ timing_response : 1500 ,
269
268
show_stim_with_feedback : false ,
270
269
timing_post_trial : 500 ,
271
270
on_finish : function ( ) {
272
- jsPsych . addDataToLastTrial ( {
271
+ jsPsych . data . addDataToLastTrial ( {
273
272
exp_stage : "test"
274
273
} )
275
274
}
0 commit comments