-
Notifications
You must be signed in to change notification settings - Fork 1
Modify the psiTurk templates
The next step is to modify the psiTurk templates for use with your experiment. When you open a template, there are a large number of files and folders. Each of these files and folders are described in Anatomy of a psiTurk project. Only a small number of these files and folders need to be changed to customize your experiment. Modifying the psiTurk templates covers how to changed these selected files and folders for use with your experiment.
Every turkAGL experiment template is a psiTurk project. When you open a psiTurk project, you will see the following files and folders:
Each of these files and folders contains important aspects of your psiTurk experiment.
config.txt
- a local configuration file that contains the unique settings for an individual experiment.
participants.db
- a SQLLite database created by psiTurk for storing data (automatically created the first time you run)
server.log
- a sever process log created by psiTurk the first time you run the server. It contains error messages and warnings (the psiTurk web server process will not print to the Terminal).
static
- a folder that holds files which are not dynamically altered by the psiTurk server (e.g. images, fonts, javascript libraries, css sheets, etc)
templates
- a folder that holds the HTML templates for different parts of your experiment, which are dynamically updated by the psiTurk server.
The config.txt
file is the only file you will need to change in the main experiment folder.
We can take a closer look inside the static
folder to see exactly what it contains.
css
- a folder containing the
css
style-sheets that describe how the HTML should be presented (e.g. layout, color, font, etc) favicon.ico
- the little icon that appears next to the URL in the browser window.
fonts
- a folder containing the fonts that are used.
js
- a folder containing the javascript libraries required for the experiment.
util.js
are some functions that support psiTurk andjsPsych
is the javascript library for building psychology experiments. lib
- a folder containing all of the external javascript libraries needed by psiTurk.
stimuli
- a folder containing all of the stimuli that will be used by your experiment.
With the exception of the stimuli
folder, you will not need to make changes to anything in the static
folder.
We can take a closer look inside the templates
folder to see exactly what it contains.
ad.html
- contains the HTML text for your experiment advertisement. This gets automatically uploaded to the psiTurk Secure Ad Server. It is the very first thing participants see when they view or accept your experiment.
complete.html
- the HTML file that completes the HIT and displays a 'complete' message.
consent.html
- the HTML file containing a link to your informed consent form.
default.html
- an HTML file that redirects someone to your ad if they access the top-level route (e.g. http://myserver.edu:PORT/)
error.html
- an HTML file that handles the errors that can occur during an experiment, and what is displayed to the participant in the event of an error.
exp.html
- the experiment itself! (a self-contained file with all of the experiment HTML and javascript)
thanks.html
- a debriefing HTML file that appears after the experiment is complete.
config.txt
ad.html
consent.html
complete.html
default.html
error.html
thanks.html
The first thing that workers will see is your ad, which is contained in ad.html
. ad.html
is actually two separate ads. The first ad is a "Call for participants", which is kind of like a flyer. It describes who is doing the experiment and what the experiment will entail, including how many minutes it will take and how much the workers can expect to be paid. The second ad is a "Thank you for accepting this HIT!", which allows workers to begin the experiment or to return the HIT if they wish to. You MUST edit the "Call for participants" portion of ad.html
to reflect your experiment. Editing the "Thank you for accepting this HIT!" portion of ad.html
is optional.
When workers see the "Call for participants", it looks exactly like the screenshot below. All experiment templates contain the exact same placeholder text (shown in the screenshot) for the "Call to participants". You must change this text in ad.html
to reflect your experiment.
To change the text in the "Call for participants", you can modify lines 166 to 182 in ad.html
. You should modify this text to reflect the text that you want your participants to see.