The dbfile

Here is an example of a dbfile. The file format is json.

------------------------

var dbInfo =

{

"expName": ["peoplePairsExperiment"],

"condName": ["PeoplePairs"],

"keyMap": {

"Yes": ["d", "D"],

"No": ["k", "K"]

},

"randomizeKeyMap": [true],

"presentKeyMapAfterTrialNumbers": [2, 5],

"addQualtricsCode": [true],

"defaultBackgroundColor": ["#000000"],

"restAfterEveryNTrials": [75],

"instructionFile": ["instruct_v3.html"],

"keyMapInstructionFile": ["default"],

"getUserNameFile": ["usern.html"],

"getConsentFile": ["consent_v3.html"],

"getDemographicsFile": ["age.html"],

"getGenderFile": ["gender.html"],

"welcomeMsg": ["<p style=\"color:white\">Welcome to the experiment. Press any key to begin.<\/p>"],

"restMsg": ["<p style=\"color:white\">You are half way through the experiment! Please take a self-timed break. Press any key to resume the experiment.<\/p>"],

"endOfExpMsg": ["<p style=\"color:white\">Thank you for taking part in the experiment.<\/p>"],

"saveMsg": ["<p style=\"color:white\">Your data is being saved. Please do not close this window until you are told to. Please press any key to continue<\/p>"]

}

------------------------

The default is to set the browser's screen to black see...

"defaultBackgroundColor": ["#000000"],

as a consequence the various messages are presented in white (e.g. <p style=\"color:white\">).

The messages are html commands.

The various html files are configured on the server in the directory that the program file is run from.

"expName": ["peoplePairsExperiment"],

"condName": ["PeoplePairs"],


expName is the general name for the experiment whereas condName is the particular name for the condition being run.


"keyMap": {

"Yes": ["d", "D"],

"No": ["k", "K"]

},

The keyMap is a json structure that defines the names of the possible responses in this case "Yes" and "No" and which keys corresponding these responses.


"randomizeKeyMap": [true],

when randomizeKeyMap is set to true, the program will randomize which keys are associated with each outcome for each participant.  This is good experimental practice so that the specific key is not confounded with the specific response.


"presentKeyMapAfterTrialNumbers": [2, 5],

We have found that participants need to be reminded of the mapping between the keys and their associated meanings.  This is a vector of trial numbers whereby the computer will present a reminder message of that mapping.  So, when set to, say, 2 and 5, the reminder message will be presented after the second and fifth trial.


"addQualtricsCode": [true],

This is specific for the instances whereby the experiment is run as a link in Qualtrics.  When set to true, a message will come up at the end of the experiment with a code to input into the qualtrics survey. The ensures that the student completed this experiment before continuing the qualtrics survey.