diff --git a/jspsych-categorize-feedback.js b/jspsych-categorize-feedback.js index 27b5d1b6..abbad3de 100644 --- a/jspsych-categorize-feedback.js +++ b/jspsych-categorize-feedback.js @@ -6,7 +6,7 @@ // way to provide corrective feedback (function( $ ) { - jsPsych.categorize-feedback = (function(){ + jsPsych.categorize_feedback = (function(){ var plugin = {}; @@ -16,7 +16,7 @@ for(var i = 0; i < trials.length; i++) { trials[i] = {}; - trials[i]["type"] = "categorize-feedback"; + trials[i]["type"] = "categorize_feedback"; trials[i]["a_path"] = cf_stims[i]; trials[i]["timing"] = params["timing"]; trials[i]["key_answer"] = params["key_answer"][i]; @@ -45,11 +45,11 @@ "class": 'cf' })); if(trial.timing[2]!=undefined){ - setTimeout(function(){cf_trial($this, block, trial, part + 1);}, trial.timing[2]); + setTimeout(function(){plugin.trial($this, block, trial, part + 1);}, trial.timing[2]); } else { //show prompt here $this.append(trial.prompt); - cf_trial($this, block, trial, part + 1); + plugin.trial($this, block, trial, part + 1); } break; case 2: @@ -88,7 +88,7 @@ block.data[block.trial_idx] = $.extend({},trial_data,trial.data); $(document).unbind('keyup',resp_func); $this.html(''); - cf_trial($this, block, trial, part + 1); + plugin.trial($this, block, trial, part + 1); } } $(document).keyup(resp_func); @@ -110,7 +110,7 @@ atext = trial.incorrect_text.replace("&ANS&", trial.text_answer); } $this.append(atext); - setTimeout(function(){cf_trial($this, block, trial, part + 1);}, trial.timing[0]); + setTimeout(function(){plugin.trial($this, block, trial, part + 1);}, trial.timing[0]); break; case 4: $this.html(""); diff --git a/jspsych-categorize-unknown.js b/jspsych-categorize-unknown.js index 0b780639..3e629f89 100644 --- a/jspsych-categorize-unknown.js +++ b/jspsych-categorize-unknown.js @@ -2,7 +2,7 @@ // if optional length to display target is missing, then target is displayed until subject responds. (function( $ ) { - jsPsych.categorize-unknown = (function(){ + jsPsych.categorize_unknown = (function(){ var plugin = {}; @@ -12,7 +12,7 @@ for(var i = 0; i < trials.length; i++) { trials[i] = {}; - trials[i]["type"] = "categorize-unknown"; + trials[i]["type"] = "categorize_unknown"; trials[i]["a_path"] = cu_stims[i]; trials[i]["timing"] = params["timing"]; trials[i]["choices"] = params["choices"]; @@ -36,11 +36,11 @@ "class": 'cu' })); if(trial.timing[1]!=undefined){ - setTimeout(function(){cu_trial($this, block, trial, part + 1);}, trial.timing[1]); + setTimeout(function(){plugin.trial($this, block, trial, part + 1);}, trial.timing[1]); } else { //show prompt here $this.append(trial.prompt); - cu_trial($this, block, trial, part + 1); + plugin.trial($this, block, trial, part + 1); } break; case 2: diff --git a/jspsych-xab.js b/jspsych-xab.js index d7e82cbf..aa6d8e87 100755 --- a/jspsych-xab.js +++ b/jspsych-xab.js @@ -32,12 +32,12 @@ "src": trial.a_path, "class": 'xab' })); - setTimeout(function(){xab_trial($this, block, trial, part + 1)}, trial.timing[0]); + setTimeout(function(){plugin.trial($this, block, trial, part + 1)}, trial.timing[0]); break; case 2: p2_time = (new Date()).getTime(); $('.xab').remove(); - setTimeout(function(){xab_trial($this, block, trial, part + 1)}, trial.timing[1]); + setTimeout(function(){plugin.trial($this, block, trial, part + 1)}, trial.timing[1]); break; case 3: p3_time = (new Date()).getTime();