oTree Forum >

No code and Unknown code Prolific

#1 by BvO

Hi all,

I just ran a study on Prolific using Heroku and oTree HR. I followed all the steps and the study ran perfectly fine, except for the end. That is, virtually all of my participants are returning without a valid completion code: either with an unknown code or no code. I asked the participant who did manage to finish with a valid completion code, and he indicated that he had finished using both suggested endings. That is, he clicked on 'Next' on the final page and, after copying the study's final page on a different tab, clicked on the URL in 'click here to continue' as suggested by the oTree HR. So, this does not help me with eliminating options. I supplied the correct completion code to oTree HR, the HTML code on screen is as follows:

Alternatively, click <a href="{{ session.prolific_completion_url }}">here</a>
to complete the study.

Has anybody had this issue before and maybe knows how to solve it?


#2 by BvO

After inquiring with my participants, they claim they were not forwarded after clicking 'Next' on the final page. This happened despite entering the correct Prolific completion URL in the Heroku config vars. Help would be greatly appreciated!

#3 by ccrabbe

Hi BvO -

Does the forwarding work when you test it yourself using "www.google.com" as the value of subsession.prolific_completion_url?

If not, do any errors show up in the javascript console?


#4 by BvO

There are no JS errors. I checked what happens myself, and the participants are indeed correct: The HTML code above correctly links to the page where the completion code is, the 'Next' button does not. Am I mistaken to include the 'Next' button? The behavior I expected from oTree is to refer the participant to the completion page instead of giving the OutOfRangeNotification page if I provide oTree HR with the completion code. 


#5 by ccrabbe

Hi BvO -

I'm not an oTree HR user, and I don't have any information about how you've set up your oTree app.  So this advice is based just on my experience with regular oTree.

Unless you explicitly are writing javascript code to override the default functionality of the button generated by the {{ next_button }} template tag, then it will still do its default behavior, which is to submit the form and move on to the next Page.  If you haven't specified any form_fields for the Page, then it will successfully submit the form.  If this is the last Page in your page_sequence, then it will show the OutOfRangeNotification page.

If you don't want subjects to be able to move past this page, omitting the next_button is a decent way to keep 99.9% of subjects from moving forward in oTree.

If you want them to forward to the completion page automatically, you need to do that on your page with Javascript.  Otherwise they will need to click the link you provide them.


#6 by BvO

Hi Chris,

Thanks for the clarification, I assumed that oTree would do some magic when and the {{ next_button }} on the last page would do something different when combined player.participant.finished = True. I don't really know why I assumed this, but I removed the button and probably things will work fine henceforth.

Thank you for your time, all the best!

Write a reply

Set forum username