mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-10 11:10:54 +00:00
Fixing some bugs due to change in the plugin structure.
This commit is contained in:
parent
befdcfc1cd
commit
94610dbccc
@ -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("");
|
||||
|
@ -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:
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user