Reply To: Mysterious "code" showing up in results file

PennController for IBEX Forums Support Mysterious "code" showing up in results file Reply To: Mysterious "code" showing up in results file

#4327
Jeremy
Keymaster

Hi Leo,

Glad to hear you’ve solved the problem.

Re. the code variable: the two lines from my previous message are the ones generating the code, and they appear outside a PennController trial in the script I sent your assistants, which means they are immediately executed when your participants open the experiment. The call to a newFunction element in the “consent” chunk (which should be the very first screen your participants see) is just to make sure that the value of code is inaccessible from the javascript console upon runtime, so participants cannot simply type code in it to see their MTurk code and validate their submission early.
As for how the value of code appears in your results file, it’s just standard uses of the .log command on the PennController trials for which to record it (all of them, in the script I sent).

Let me know if you have any questions

Jeremy