#1 by mohamadre3a
Hello everyone, I have a question regarding my experiment setup. It’s hosted on Heroku, and I’m planning to run it in an in-person lab with students. My concern is that I don’t want anyone outside of this lab, including students who aren’t there, to access the experiment and complete it. I thought about creating unique usernames and passwords for each participant and handing them out in the lab, but I’m not sure if that’s the best or most convenient option. What are some possible solutions?
#2
by
ccrabbe
Hi mohamadre3a - oTree's solution to this problem is configuring a room *with participant labels* and then either having the students enter a participant label upon starting (which is checked against this configured list) or distributing links in the lab which already contain the participant label. https://otree.readthedocs.io/en/latest/rooms.html?highlight=rooms#participant-labels If you set the participant labels to be random alphanumeric strings, for example, nobody outside the lab will be able to guess. Thanks, --Chris
#3
by
BonnEconLab
(edited )
We frequently use oTree for in-person experiments at the BonnEconLab. We use oTree rooms for this purpose in combination with participant labels, just like @ccrabbe already suggested. More precisely, what we usually do is the following: 1. We wait for participants to arrive. 2. Only then do we open the room with the very number of participants present. – This way, we avoid that there are any missing participants whom we would have to advance manually. – Opening the room just in time makes it highly unlikely that any unauthorized person could access your experiment. – In addition, you could choose a name for the room that is very difficult to guess (similar to @ccrabbe’s suggestion of using “random alphanumeric strings” for the participant labels). 3. The participant labels that we use reflect the cubicle numbers in our lab. – This way, it is easy to associate, for instance, the payment that a participant is supposed to receive with the cubicle number. 4. After opening the room, we go from PC to PC according to the cubicle numbers and open the oTree URL one by one. – This has the desirable effect that the listings of the connected clients in oTree’s “Monitor,” “Data,” and “Payment” tabs are sorted by the cubicle number. – Once all participants in the lab have completed the experiment, no one can access your experiment anymore (even if you leave the room open).
#4 by YANG
Could you please tell me how to use PCs in computer lab without installing anything to open the oTree URL? Since currently I cannot open the URL (https://localhost:8000/) using those PCs.
#5
by
BonnEconLab
You have to replace “localhost” by the IP address of the computer on which you are running oTree (that is, something like http://123.456.789.012:8000). Additionally, the firewall of the computer on which you are running oTree (and your department’s firewall) need to allow connections to that computer via port 8000.
#6 by YANG
Thank you. But should I still use "otree zipserver" in Terminal of Macbook, it automatically shows "localhost" and if I change to my own IP address, the link does not work.
#7 by YANG
Sorry for this following question, since I am using PCs in computer lab of the university which are connected through Ethernet. I found that those PCs cannot open the link even though I change the link to the IP address. Did you also face this issue? If you do, how did you fix it? And should we use Heroku instead? Thank you so much.
#8
by
BonnEconLab
You mention using a MacBook and PCs in the computer lab of your university, which are connected via Ethernet. Is your MacBook also connected (ideally to the same subnet) via Ethernet? If it is connected via Wi-Fi, some firewall probably prevents the connection from the PCs to your MacBook. At my workplace, if I run oTree on one computer (connected via Ethernet) and then open http://131.220.xxx.xxx:8000 on a differentnt computer (connected via Ethernet), everything works as expected. I have to execute `otree prodserver`, though, not `otree devserver` (so you have to do `otree unzip ...` first).