systematically saving stimulus and slider start position in all slider plugins

This commit is contained in:
Salva Ardid 2020-06-02 21:40:40 -04:00
parent a5650993ed
commit 8729972db6
4 changed files with 10 additions and 5 deletions

View File

@ -181,7 +181,8 @@ jsPsych.plugins['audio-slider-response'] = (function() {
// save data
var trialdata = {
"rt": response.rt,
"stimulus": trial.stimulus,
"stimulus": trial.stimulus,
"start": trial.start,
"response": response.response
};

View File

@ -135,7 +135,7 @@ jsPsych.plugins['html-slider-response'] = (function() {
rt: null,
response: null
};
if(trial.require_movement){
display_element.querySelector('#jspsych-html-slider-response-response').addEventListener('change', function(){
display_element.querySelector('#jspsych-html-slider-response-next').disabled = false;
@ -163,8 +163,9 @@ jsPsych.plugins['html-slider-response'] = (function() {
// save data
var trialdata = {
"rt": response.rt,
"response": response.response,
"stimulus": trial.stimulus
"stimulus": trial.stimulus,
"start": trial.start,
"response": response.response
};
display_element.innerHTML = '';

View File

@ -198,6 +198,8 @@ jsPsych.plugins['image-slider-response'] = (function() {
// save data
var trialdata = {
"rt": response.rt,
"stimulus": trial.stimulus,
"start": trial.start,
"response": response.response
};

View File

@ -171,7 +171,7 @@ jsPsych.plugins["video-slider-response"] = (function() {
}
var type = file_name.substr(file_name.lastIndexOf('.') + 1);
type = type.toLowerCase();
video_html+='<source src="' + file_name + '" type="video/'+type+'">';
video_html+='<source src="' + file_name + '" type="video/'+type+'">';
}
}
video_html += "</video>";
@ -269,6 +269,7 @@ jsPsych.plugins["video-slider-response"] = (function() {
var trial_data = {
"rt": response.rt,
"stimulus": trial.stimulus,
"start": trial.start,
"response": response.response
};