Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Randomly show group 1 or group 2

  • tammo
  • tammo's Avatar Topic Author
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
6 years 7 months ago #158122 by tammo
Randomly show group 1 or group 2 was created by tammo
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 Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
  • tammo
  • tammo's Avatar Topic Author
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
6 years 7 months ago #158125 by tammo
Replied by tammo on 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 Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 7 months ago #158129 by DenisChenu
Replied by DenisChenu on 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 , plugin development .
I don't answer to private message.
The topic has been locked.
More
6 years 7 months ago #158143 by jelo
Replied by jelo on 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.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 7 months ago #158145 by DenisChenu
Replied by DenisChenu on 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 , plugin development .
I don't answer to private message.
The topic has been locked.
  • tammo
  • tammo's Avatar Topic Author
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
6 years 7 months ago #158150 by tammo
Replied by tammo on 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 Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 7 months ago #158151 by DenisChenu
Replied by DenisChenu on 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 , plugin development .
I don't answer to private message.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose