Randomly show group 1 or group 2

More
1 month 3 weeks ago #158122 by tammo
tammo created the topic: Randomly show group 1 or group 2
I am definitely going in circles, but I cannot get it to work, simple as it might be. Can anyone send me in the good direction?

Group called random has one (equation) question called prepost with {rand(1,2)}

Group Prepost =1 has relevance prepost==1
Group Prepost=2 has relevance prepost==2

But sometimes prepost == 1 and group Prepost = 2 is shown and the other way around. What am I doing wrong?

See attached .lss. Using 2.67.3, default template



Tammo ter Hark at Tools for Research
Proud developers of the TFR Responsive Limesurvey template
toolsforresearch.com/limesurvey-responsive-template
Attachments:

Please Log in to join the conversation.

More
1 month 3 weeks ago #158125 by tammo
tammo replied the topic: Randomly show group 1 or group 2
Strange: all seems to go right when I use:
if(is_empty(prepost), rand(1, 2), prepost)
for the equation. That was suggested by tpartner in another thread, but for preventing changes when a respondent reopens a survey. That is not happening here, or is it?

www.limesurvey.org/forum/can-i-do-this-w...ns-and-randomisation


Tammo ter Hark at Tools for Research
Proud developers of the TFR Responsive Limesurvey template
toolsforresearch.com/limesurvey-responsive-template

Please Log in to join the conversation.

More
1 month 3 weeks ago #158129 by DenisChenu
DenisChenu replied the topic: Randomly show group 1 or group 2
When user 'reload' survey : his response come from exiting answers. Then is_empty(prepost) is false and not updated.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
1 month 3 weeks ago #158143 by jelo
jelo replied the topic: Randomly show group 1 or group 2

tammo wrote: That is not happening here, or is it?

EM is hell ;-) The equation in the attached survey had some additional tags in the question text.
Not sure if that might be an issue. Beside that everything looks fine to me.


I sometimes had issues with groups with just equations.
I normally use the first group to create all random variables and add a welcome text in that first group.
Attachments:

Please Log in to join the conversation.

More
1 month 3 weeks ago #158145 by DenisChenu
DenisChenu replied the topic: Randomly show group 1 or group 2

The equation in the attached survey had some additional tags in the question text

One of the reason of the equation advanced settings. To put an clean Equation : best is to use a clean textarea :)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
1 month 3 weeks ago #158150 by tammo
tammo replied the topic: Randomly show group 1 or group 2
Yes, I guess that would lead to just another feature request: make text area switchable per question: either HTML or plain text.

I know that many developers always use plain text and type HTML from memory, but that cannot be done when you have "normal" users...


Tammo ter Hark at Tools for Research
Proud developers of the TFR Responsive Limesurvey template
toolsforresearch.com/limesurvey-responsive-template

Please Log in to join the conversation.

More
1 month 3 weeks ago #158151 by DenisChenu
DenisChenu replied the topic: Randomly show group 1 or group 2
The html editor must be improved, yes. But such feature are not really needed currently : Equation question type already have a textarea for Equation : manual.limesurvey.org/Question_type_-_Eq...uestion_.28hidden.29

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now