URL of experiment: impasseandcuriosity [PsychoPy]
Description of the problem: Error checking python code has not converted correctly to javascript.
The Python code:
user_answer = answer_text.text.lower().strip() # Convert to lowercase and remove extra spaces
correct_answer = correct.lower().strip() # Convert correct answer from conditions file to lowercase
Store if it was correct
is_correct = (user_answer == correct_answer)
thisExp.addData(‘user_answer’, user_answer)
thisExp.addData(‘is_correct’, is_correct)
The automatically converted JavaScript code:
user_answer = answer_text.text.toLowerCase().strip();
correct_answer = correct.toLowerCase().strip();
is_correct = (user_answer === correct_answer);
psychoJS.experiment.addData(“user_answer”, user_answer);
psychoJS.experiment.addData(“is_correct”, is_correct);
Can anyone talk me through the changes I would have to make for it to work online?
Merry Christmas!!