my lab is very much looking forward to the new online option!
I know that it is still under development, but we still want to try it in a pilot study in February/2018.
Since participants will be running the experiment on their own, it would be very helpful if we could provide feedback as described here: http://www.psychopy.org/recipes/builderFeedback.html
I’m aware that the code component is not available for online experiments yet, but maybe anybody knows a work-around, as in adding some code to the index.html file? Or maybe you already have a beta version that we could try?
Yes, you would need to edit that file yourself. The relevant code would be Javascript rather than Python, so there won’t be much expertise on this forum to help you with that.
No. A commercial company has recently started the next round of development on the online experiment capability but it is not ready to release yet, even in beta form.
I’ve figured out how to do it by adding code to the index.html file. Thankfully it’s not too complicated - I don’t have experience with Javascript myself.
Here’s my solution:
In Builder, insert routine with text stimulus where you want your feedback to be presented (just as you would normally do, but do NOT add a code component to the routine). Add a variable (e.g. $feedback_message) as text to the text component and ‘set every repeat’.
When you’ve exported the experiment, open the index.html file in a text editor.
Search (cmd + F) for your variable (feedback_message). You should get to a line saying
// update component parameters for each repeat
feedback_text.setText(feedback_message);
Note that if you forgot to ‘set every repeat’, you would have to add the
feedback_text.setText(feedback_message);
line yourself. You would also have to jump to the section where your feedback routine is initialized and change text to:
text : ‘default text’
Just above this line, add your code (what you would write in your code component), e.g.: