mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-12 08:38:11 +00:00
fix data recording for non-response
This commit is contained in:
parent
a74e9555a9
commit
fe6b321678
@ -151,7 +151,11 @@ jsPsych.plugins['survey-multi-choice'] = (function() {
|
||||
var matches = display_element.querySelectorAll("div." + plugin_id_name + "-question");
|
||||
matches.forEach(function(match, index) {
|
||||
var id = "Q" + index;
|
||||
var val = match.querySelector("input[type=radio]:checked").value;
|
||||
if(match.querySelector("input[type=radio]:checked") !== null){
|
||||
var val = match.querySelector("input[type=radio]:checked").value;
|
||||
} else {
|
||||
var val = "";
|
||||
}
|
||||
var obje = {};
|
||||
obje[id] = val;
|
||||
Object.assign(question_data, obje);
|
||||
|
Loading…
Reference in New Issue
Block a user