|
Post by lourenco on May 12, 2020 15:05:48 GMT
Hi there!
So, I have two very similar experiments, changing only the quality of a stimulus.
I want to embed on the same survey both of them, but each participant doing just one, in a way that is random which experiment each participant is going to do.
Is there a way to do it?
I've tried the following coding, but what is happening is both experiments are being done, just the order being random. I want each participant to do one experiment at random.
"l: examplequestion1 t: radio q: Which of the following foods do you like best? - Rice - Noodles - Bread - Potatoes
l: examplequestion2 t: check q: Select all of the following drinks did you had today? - Water - Orange juice - Tea - Coffee
l: chooserandom t: set - random 1 2
l: t: jump - if $chooserandom == 1 then goto experimento_1 - if $chooserandom == 2 then goto experimento_2
l: experimento_1 t: experiment - experimento_1
l: experimento_2 t: experiment - experimento_2 "
|
|
|
Post by PsyToolkit on May 12, 2020 15:34:33 GMT
After you do the experiment, you need to have an unconditional jump. I show you (in red) what you can write. Note that if the computer chooses "1", then you do not really need a goto line, because the next question is done anyway. Also, if you have just one "if" in a line, you can just use "j:" as a shortcut. This is new in the latest version.
l: examplequestion1
t: radio
q: Which of the following foods do you like best?
- Rice
- Noodles
- Bread
- Potatoes
l: examplequestion2
t: check
q: Select all of the following drinks did you had today?
- Water
- Orange juice
- Tea
- Coffee
l: chooserandom
t: set
- random 1 2
j: if $chooserandom == 2 then goto experimento_2
l: experimento_1
t: experiment
- experimento_1
j: some_other_question
l: experimento_2
t: experiment
- experimento_2
l: some_other_question t: radio q: What do you want to do now - Eat - Drink
|
|
|
Post by lourenco on May 12, 2020 16:14:32 GMT
Thank you so much! I will try this and check if it works. After you do the experiment, you need to have an unconditional jump. I show you (in red) what you can write. Note that if the computer chooses "1", then you do not really need a goto line, because the next question is done anyway. Also, if you have just one "if" in a line, you can just use "j:" as a shortcut. This is new in the latest version.
l: examplequestion1
t: radio
q: Which of the following foods do you like best?
- Rice
- Noodles
- Bread
- Potatoes
l: examplequestion2
t: check
q: Select all of the following drinks did you had today?
- Water
- Orange juice
- Tea
- Coffee
l: chooserandom
t: set
- random 1 2
j: if $chooserandom == 2 then goto experimento_2
l: experimento_1
t: experiment
- experimento_1
j: some_other_question
l: experimento_2
t: experiment
- experimento_2
l: some_other_question t: radio q: What do you want to do now - Eat - Drink
|
|
|
Post by lourenco on May 13, 2020 3:14:30 GMT
So it worked fine, thank you!
Another two doubts, if you may help:
Is it possible to change fontsize of questions?
And is it possible to allow go forward on the survey only if the last question was answered?
|
|
|
Post by PsyToolkit on May 13, 2020 8:16:42 GMT
|
|
|
Post by lourenco on May 13, 2020 16:10:04 GMT
Thank you for the answer.
So I've tried to code like this:
l: Nome t: textline q: <p style="font-size:40px">Qual é o seu nome?</p> - Nome e Sobrenome
l: idade t: textline q: Qual é a sua idade? - {min=18,max=50}
But it didn't seem to do any effect. Fontsize of question A still the same as question B.
And about the other question: on my survey it seems the default is the opposite. I can go on without writing or checking anything. I've tried to look for some option I can disable this, but I haven't found.
|
|
|
Post by PsyToolkit on May 13, 2020 17:29:01 GMT
you can try: {require} in the line. See documentation
|
|