Limit participant to one response for whole experiment

I’m recruiting participants on Prolific and running a repeated measures experiment where they have to rate different images. However, because each rating task is timed some participants don’t respond to the task before it moves on to the next image; in some case, these participants get to the end of the experiment and restart it in other to ‘correct’ their ratings.

I would like to limit participants to just one trial. Is there a way to do this? Thanks!

By trial I assume you mean session.

You could add the Prolific id to the shelf and then halt the experiment if the value is already there.

Thank you! Yes, I meant session. I’ll try this out!

Just thought to add how I implemented this for anyone in the future with the same question. I created a new Dictionary record in the Shelf with the Key titled completed_participants and selected the particular experiment in the Scope.

Then I added a code block in the experiment with the code type as JS with the following code:

existing_participants = await psychoJS.shelf.getDictionaryFieldNames({key: ["completed_participants"]})

if(!existing_participants.includes(expInfo['PROLIFIC_PID'])){
    psychoJS.shelf.setDictionaryFieldValue({key: ["completed_participants"], fieldName: expInfo['PROLIFIC_PID'], fieldValue :1})
    }else{
        quitPsychoJS('You have already completed the study.', false);
    }

This seemed to work.