After you created a new study ... what comes next?
Developement of a JATOS study usually happens on your local JATOS: Run an experiment with JATOS - Workflow
Add a component
If you have an empty study you want to add a component. A component corresponds to a webpage defined by an HTML file. A study can have more than one component - this is actually a strength of JATOS: e.g. one can combine different experiments into one, or easily add an survey to an existing experiment.
To add a component go to your study and click on Components -> New.
Then in the following form you define the component's properties: enter the component's title and most importantly its 'HTML file path'. This is the path to the HTML file that starts this component.
Click on 'Create' and you are done. If you add more than one component you can change the order in which they run by drag-and-drop on the position button.
Mandatory lines in your components' HTML
A study can have one or multiple components and each component has an HTML file associated that is defined in the component's properties.
Here is the absolute minimum that any component HTML file must have to run with JATOS:
A link to the jatos.js library in the head section
The second bit is not really necessary but without defining the
// Start here with your code that uses jatos.js' variables and functions
Save your result data
You probably want to save the data that is collected during your experiments. There are generally two ways to do this: 1) result data or 2) result files - and there is a documentation page about it.
Study JSON Input and Component JSON Input
E.g. you want to be able to quickly change
- an introductory text
- the number of trials
- some parameter needed in the experiment
This you can achieve with the Study JSON Input or Component JSON Input because both can be easily edited in the Study Properties or Component Properties.
The difference between the Study JSON Input and Component JSON Input is that the first one is available during the whole study run, in all components, and the latter one only in the component for which it is specified.
If you put the following in the Study JSON Input
"introduction": "this is a text",
"order": [3, 1, 2]
Study / Batch / Group Session
The sessions are there to help you exchange data within a study, batch or group. The Study Session allows to pass on data within the same study run, from one component to the next. With the Batch Session one can transfer data between study runs that belong to the same batch. There is a whole page dedicated to those sessions: Session Data - Three Types.