psychopy.org | Reference | Downloads | Github

Pavlovia.org create an online experiment by invitation

psychopy3
pavlovia
#1

Dear all,

I’m preparing a behavioural experiment on pavlovia.org for a project that I’m running (using the builder of Psychopy3).
My basic idea is to create an experiment that will display some MRI images and the participant has to select some of them.
Due to the sensible content, I would like to run the experiment in a private way, for example sending private invitation by link, or accessing the experiment only with a password.
Is it possible in some way?

Sorry if the post has already a solution, but I could not find any reference or suggestion online.

Thanks!
Best,
Michele

0 Likes

#2

Hi @rockNroll87q, the easiest option for you is to keep your experiment private but active on Pavlovia, and to send a link to the experiment for each of your participants. For example, here is a link to one of the demos available for public use on Pavlovia:

https://pavlovia.org/run/demos/bart/html/

0 Likes

#3

Thanks @dvbridges for your reply!
It’s actually working (shame on me that I didn’t try).

Do you think is possible to insert a password, in some way?
I notice that there is this for inserting text, even if it’s not the best graphical outcome.

Thanks!
Michele

0 Likes

#4

The recruitment policy side of pavlovia, in terms of allowing/preventing certain participants is actually being worked on right now and will have methods built-in to enable better privacy etc.

@dvbridges suggestion doesn’t actually prevent others from being able to run your study if they did come across it.

You could do this in Javascript within your study though. What you could do though is set a field in your experiment settings called, say, password

Then in your first routine you can do a quick check for whether they typed the right code. For instance I think you can specify the goodbye message as the experiment ends like this:

if (expInfo['password'] != '113322') {
    return psychoJS.quit("Sorry that password isn't correct. You can refresh the page to try again.", false);
}

If that doesn’t work then you might need to use two if statements, one for announcing “wrong password” (eg in the beginning of instructions) and then another to actually quit the experiment (e.g. end of the same routine)

0 Likes

#5

Good idea. Going a step further, if you wanted to keep the password out of the actual JavaScript, you could store your passwords in a conditions file, and check entries at the beginning of the experiment using the trialHandler object. This has the benefit of being a hidden resource when running the task - you cannot easily see the resources in Developers Tools (if at all) and so the passwords remain hidden.

If you had an excel file called “passwords.xlsx” which has a column (“pw”) for different passwords, then in the “begin experiment” tab:

pw = new TrialHandler({
    psychoJS,
    nReps: 1, method: TrialHandler.Method.SEQUENTIAL,
    extraInfo: expInfo, originPath: undefined,
    trialList: 'passwords.xlsx',
    seed: undefined, name: 'passwords'});
 
// Define a row number in your excel file
rowNumber = 0;
// Check if the password matches the users input from the GUI
if (pw.trialList[rowNumber]['pw'] != expInfo['password']) {
    return quitPsychoJS("Sorry that password isn't correct. You can refresh the page to try again.", false);
    }

If you wanted a different password for each participant, you could set the row number using another field from the gui at the beginning of the experiment.

Or you could just do Jons example, which is less complicated :slight_smile:

0 Likes

#6

Thanks a lot to both!
I’ll try the quick solution first (thanks @jon) , but also @dvbridges 's solution looks promising!

Best,
Michele

0 Likes