Skip to content

Commit bd2ed14

Browse files
committed
Merge pull request #422 from IanEisenberg/update_test
updated test_task to test for added Data
2 parents 8f3b881 + 3cc2936 commit bd2ed14

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

test_task/config.json

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"run": [
66
"static/js/jspsych/jspsych.js",
77
"static/js/jspsych/plugins/jspsych-text.js",
8+
"static/js/jspsych/plugins/jspsych-call-function.js",
89
"static/js/jspsych/plugins/jspsych-survey-text.js",
910
"static/js/jspsych/poldrack_plugins/jspsych-poldrack-text.js",
1011
"static/js/jspsych/poldrack_plugins/jspsych-attention-check.js",

test_task/experiment.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,13 @@ var attention_node = {
6060
}
6161
}
6262

63+
var add_data = {
64+
type: 'call-function',
65+
func: function() {
66+
jsPsych.data.addDataToLastTrial({'added_Data?': 'success!'})
67+
}
68+
}
69+
6370
//Set up post task questionnaire
6471
var post_task_block = {
6572
type: 'survey-text',
@@ -69,7 +76,7 @@ var post_task_block = {
6976
questions: ['<p class = center-block-text style = "font-size: 20px">Please summarize what you were asked to do in this task.</p>',
7077
'<p class = center-block-text style = "font-size: 20px">Do you have any comments about this task?</p>'],
7178
rows: [15, 15],
72-
columns: [60,60]
79+
columns: [60,60],
7380
};
7481

7582
/* define static blocks */
@@ -99,6 +106,7 @@ var test_task_experiment = [];
99106
for (var i = 0; i < experiment_len; i++) {
100107
test_task_experiment.push(test_block);
101108
}
109+
test_task_experiment.push(add_data)
102110
test_task_experiment.push(attention_node)
103111
test_task_experiment.push(post_task_block)
104112
test_task_experiment.push(end_block);

0 commit comments

Comments
 (0)