You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code is a sample program using the survey-likert plugin, and it is expected to display a random number in the question items for each trial.
varjsPsych=initJsPsych({on_finish: function(){jsPsych.data.displayData();}});varscale=["Strongly Disagree","Disagree","Neutral","Agree","Strongly Agree"];varlikert_trial={type: jsPsychSurveyLikert,questions: [{prompt: function(){returnMath.random()},name: 'Vegetables',labels: scale,required: true},{prompt: "I like fruit.",name: 'Fruit',labels: scale,required: true}],};constloop_node={timeline: [likert_trial],loop_function: function(data){returntrue}}jsPsych.run([loop_node]);
The above code works fine in jsPsych version 7.3.2, but, in version 8.2.1, the numbers do not change randomly and a fixed number is displayed. I am unsure whether this is a bug or the behavior of loop_function has changed. If it is the latter, how should I modify the code?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, all,
The following code is a sample program using the survey-likert plugin, and it is expected to display a random number in the question items for each trial.
The above code works fine in jsPsych version 7.3.2, but, in version 8.2.1, the numbers do not change randomly and a fixed number is displayed. I am unsure whether this is a bug or the behavior of loop_function has changed. If it is the latter, how should I modify the code?
Best regards,
Daiichiro
Beta Was this translation helpful? Give feedback.
All reactions