Adding questions before online experiment
Hello everyone,
I am about to run an online OpenSesame experiment using JATOS, and I was wondering if it would be possible to make participants answer a question before the experiment itself. For example, once participants get the link to the online experiment and click on it, I was wondering if it is possible to ask them the identifier number I will give them to keep a record of all the experiments the same person has done. Thus, onece the participant types his/her personal identifier number, the experiment itself would begin: clicking on the OSWeb screen, instructions, etc.
Thank you in advance for the help!
Comments
Hi,
I'm not sure which possibilities OpenSesame offers but with JATOS you could just add another component that is doing your questionnaire and put it in front of the OpenSesame component. Of course, since it's pure JATOS, you would have to write your own JS/HTML/CSS. For an example have a look at the "Demographic and Survey Questions" example study (https://www.jatos.org/Example-Studies).
Best,
Kristian
Hi @kri ,
Thank you for the information. I tried to download the "Demographic and Survey Questions" example study but I get a .jzip file that I cannot open. Is the .jzip format correct? I would also like to ask where I am supposed to write my own JS/HTML/CSS.
Thanks again for all the help!
Best,
Elena
Hi Elena,
It sounds like you're not so familiar with editing studies in JATOS itself (which isn't hard at all, but still). If there is a solution from within OSWeb to get this additional, initial question, I would suggest you follow that road actually. You're not the first one to ask so maybe it already exists.
But to follow Kristian's good suggestion, please read my answer to this question, which is similar to yours.
Best
Elisa
Hi @elisa ,
Thanks for the explanation. I read it and tried to follow all the steps, which do not seem difficult, but I am having problems exporting my questionnaire in LimeSurvey as a .zip file so that I can afterwards import it to JATOS. This is the survey:
https://phdexperiments.limesurvey.net/497196?lang=es
Would you know why this happens? Thank you again for all the help
Best,
Elena
Hi Elena,
I don't know about LimeSurvey. It will for sure not export a file that is automatically compatible with JATOS.
The first step will be to figure out if you can export the HTML/JS/CSS at all.
Can you do this one question as a separate study on OSWeb? That will make everything easier
Best
Hi @elisa,
To be honest, I simply implemented the survey in LimeSurvey in case it was easier to create a separate study that I could afterwards import to JATOS and end up having two components within the same experiment (the survey + OSWeb experiment). My first attemp was using SurveyJS to create the following:
However, with the free version of SurveyJS, I have read that the only thing I can do is copy and paste the JavaScript code from their webpage. The thing is that first, I don't know where I can get this code from and then, I don't know where I have to implement the code to that I can save it as a file and upload it to JATOS in a compatible format. I am extremely sorry for all the questions. I am not familiar with programming and after reading and watching many videos, I still don't understand the steps to import into JATOS a questionnaire created in an external webpage so that this becomes the first component of my experiment.
Best regards,
Elena
Hi Elena,
I'm happy to help with JATOS, but I don't know SurveyJS. There are many ways to create a JS for a survey, once you get it, I'm happy to help you integrate that into your JATOS study :)
Best
Hi @elisa,
I think I finally managed to create the HTML/JS/CSS for the survey. I am attaching here the .zip file I got:
Would you mind telling me how to proceed now, please? Do I have to follow now the steps in this question?
Thanks a million and I am sorry for all the inconveniences.
Best,
Elena
Hi Elena, the first step was to 'jatosify' your component. That meant adding the link to the jatos.js library in the index.html file, wrapping what happens in the index.js file inside the jatos.onLoad function, and making sure that the data are submitted to JATOS (and not logged on the console, as your code correctly did, because there was no JATOS) by calling the function jatos.StartNextComponent with the correct data inside.
https://www.jatos.org/Adapt-pre-written-code-to-run-it-in-JATOS.html
Here's your survey, jatosified. Now yes, you can follow the steps in that question. (I can't upload jzip files, so it's on my dropbox)
Best
Elisa
Hi @elisa,
Thanks a million for that!! It is such a relief for me :)
I also feel awful because I am trying to follow the steps above but I have a problem with Step 2 (Import the OSWeb_study.zip into JATOS. On the component bar, click on More> Export Properties. Save this file on your (e.g.) Desktop.).
I imported my OSWeb expperiment in a .zip file, but when I click on "More" in the component bar, I do not see an option "Export properties" and therefore, I cannot download the .jac file you mentioned in the comments below (I see there was someone having the same issue). Maybe is it because now the JATOS version is a new one and this option is on a different place?
I am so so sorry for all the overwhelming questions.
Best,
Elena
Hi, you're right, that disappeared in the newer versions.
This is a question that comes up a lot, so I made a wiki page.
Can you try again?
Hi @elisa,
It worked perfectly!!!! Thank you so much! :)
I've been trying to do the same with another survey, following the steps in this page but I must be doing sth wrong because when I try to import the .zip file with the code to JATOS, I get the following message: Import of study failed: Study is invalid
Would you mind having a look at it, please?
I'm sorry and thank you again,
Elena
Hi,
Let's start differently :) Tell me what you did exactly and I might be able to say why it won't work
Best
Elisa
Hi @elisa,
The thing is that I have to conduct the same experiment for Spanish and English natives, so I need a Spanish and an English version of it. After all your help, I already have the Spanish experiment, so I started with the English one (a survey + an OSWeb experiment). For that, I translated the questions of the survey into English and I added them to a "plain" code in SurveyJS that was not "Jatosified" yet. So the next step was trying to Jatosify it, just like you did some days ago.
In the index.html file of my survey, I added the link to the jatos.js library. I also added the jatos.onLoad function at the beginning of the index.js file to "wrap" what I already had in there, and I added the function jatos.StartNextComponent at the end. Afterwards, I got a .zip file with the HTML/JS/CSS of my Jatosified survey (assuming I did everything correctly) and tried to import it from JATOS, but when I select the .zip file and click on Import, I get the message: Import of study failed: Study is invalid
I am sure I must be missing something, but so far I haven't managed to find out what.
Thank you so much again :)
Hi Elena,
Yeah, from what I understand you zipped your HTML/JS/CSS by hand. That doesn't produce something that JATOS can understand
You should not try to generate a .jzip file by hand at this point. A JZIP study archive file is a ZIP archive with a standarized content. They contain information that JATOS needs to understand that something is a study.
If you need to translate your study, I recommend you start the study I sent you, which is already correctly jatosified. Do the following:
Hi again @elisa,
You're the best, that worked perfectly! I finally have the two translated versions of my study
Thanks a million for everything :)
Best,
Elena