Javascript implementation of multiple online studies distributed via psyserver.
The root directory is structured as follows:
studies/
├── data
│ ├── example
│ ├── free-association
│ └── ...
├── readme
├── scripts
│ ├── get_data.sh
│ └── sync.sh
├── www
│ ├── free-association
│ └── linger-interference-pause
├── .gitignore
└── README.mddatacontains the data collected for each study. The directory names in data are the same as the ones in wwwreadmecontains files for the readme.scriptscontains a synchronization script to psyserver (sync.py) and a data download script (get_data.py)wwwcontains the code for each study.
Within the study directory you find:
starter.html: can start a study with appropriate parametersindex.html: main wrapper page for study, will load the javascript and iniate the first screen.- All single page html files such as
consent.htmlorcomplete.html - Folders of html files belonging to one
stage staticfolder with subfolders:css: css files, also bootstrap css filefonts: fonts for studiesjs: all js files running the study, includingmain.js, the point of entry specified inindex.htmlcomponent: All objects that are potentially used multiple times in the study returned as an instantiable class. For instancePages.js, which loads and displays a page.module: Objects that are used throughout the study, but always refer to the one same object. The object itself is returned, and only instantiated once.stage: An object equivalent to a "stage" of the study. Everything that happens onscreen, happens in a stage. Stages need to have a name, which is automatically logged when the stage moves on.
lib: libraries such as the bootstrap, jquery, require.js files
Chained free association task (also: word chain game).
Participants are asked to type any word that comes to mind, and then based on that word type the next word that comes to mind.
A study in which participants do free association, read a story, go through a pause, and then to free association again.
A study in which participants get a personality/rumination/depression and ocd questionnare at the end.
Set the backup folder in a .env:
STUDY_BACKUP_FOLDER="path/to/backup/folder/on/host"
Now you can use:
# To back up:
scripts/backup.py studyname hostname
# To recover backup
scripts/backup.py studyname hostname --recover