Welcome to the LimeSurvey Community Forum

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

chose a certain number of question groups

More
7 years 2 months ago - 7 years 2 months ago #170115 by zoe123
Dear Limesurvey-Experts
I use Version 2.06lts Build 160524

I have a problem with randomization and picking a certain number of question groups. My survey right now has 21 question-groups. Within every question-group, all the questions must be answered. Every participant needs to answer question-group 1(intro), 20 and 21(demographics). Since the survey would be extremely exhausting to answer because it contains more than 200 questions in total, I thought I let the users just answer 6 question groups from question-group 2-19.
How can I make 3 different question-group packages (namely question groups 1,2,3,4,5,6,7, 20,21 and 1,8,9,10,11,12, 13, 20,21 and 1,14,15,16,17,18, 19, 20,21) and evenly distribute the users to the three different packages of question groups?

The survey should have this structure afterwards:

question-group 1 (intro)
6 questions-groups picked from my question groups 2-19
question-group 20 (mandatory)
question-group 21(demographical questions)

Is there an solution to my problem without coding?
(I already tried to insert a new question for randomization for 2 Groups with {rand(1,2)} or {if(randnumber > 0, randnumber, rand(1, 2))} and then in my Question groups into the relevance field randnumber==1or randnumber==2 but it`s unfortunately not working)


If someone could help me I would be extremely thankful!
Last edit: 7 years 2 months ago by zoe123.
The topic has been locked.
More
7 years 2 months ago - 7 years 2 months ago #170124 by tpartner
Create an equation question (hidden via CSS) "randnumber" to generate a random number between 1 and 3.

Code:
{if(is_empty(randnumber), rand(1, 3), randnumber)}

The relevance for groups 2,3,4,5,6,7 would be randnumber == '1'.
The relevance for groups 8,9,10,11,12,13 would be randnumber == '2'.
The relevance for groups 14,15,16,17,18,19 would be randnumber == '3'.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 7 years 2 months ago by tpartner.
The topic has been locked.
More
7 years 2 months ago #170126 by zoe123
Hello tpartner, thank you so much for your help!!!
I typed in all your instructions (see example screenshots attached (in german settings))
But now I have the problem, that in preview it only shows me my first and two last question groups (1, 20&21) an none of the ones I wanted to randomize. Where did they go?
More
7 years 2 months ago - 7 years 2 months ago #170128 by tpartner
You have given the equation question a different question code - as I said, it should be "randnumber ".


Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 7 years 2 months ago by tpartner.
The topic has been locked.
More
7 years 2 months ago #170129 by zoe123
Like in the picture? I changed the name of the question group and question to "randnumber".
But it is unfortunately somehow still not working.

And I have another question. I randomized question groups 2-19 with the name "MixIt". Does that matter when I now split these in the 3 groups as you explained above? Do I need to make new randomization groups? For example for random==1 "MixIt1", for random==2 "Mixit2" and for random==3 "MixIt3" ?
The topic has been locked.
More
7 years 2 months ago #170130 by tpartner
Can you attach an export of a test survey?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
7 years 2 months ago #170132 by zoe123
Here is a demo version. Somehow when I try to export the whole demo version I can only download a file in the format limesurvey_survey_numberX.lss.xml But its impossible to import or upload (here in the forum) a file with the ending lss.xml

I downloaded therefore the single questiongroups which automatically come in .lss format.

I d like the participants to click "Instruktionen", Situation1 or 2 or 3 and "Abschluss Exit". When I run the demo preview even here I only see "Instruktionen" and "Abschluss Exit", the groups I want to randomize are missing.
The topic has been locked.
More
7 years 2 months ago #170133 by tpartner
I'm sorry, I don't have time to create a huge survey to test.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
7 years 2 months ago #170135 by zoe123
yes, of course I understand that!
But how can I export a .lss file? Is it because I am using a Mac?
The download icon gives me the option .lss but in my download folder arrives always .lss.xml
The topic has been locked.
More
7 years 2 months ago #170136 by tpartner
Rename it, removing the .xml extension.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
7 years 2 months ago #170137 by zoe123
Here is the file finally!

Thank you so much for helping! Honestly!
It`s since days that I am trying to find a solution but I am a newbie in limesurvey and really bad in coding..

Greetings Zoe
The topic has been locked.
More
7 years 2 months ago #170142 by tpartner
Three problems:

1) In the equation question, there was a bunch of unnecessary HTML.

2) You were using the wrong question code in all of your relevance equations.

3) The equation question does not need it's own group.

I have attached a working version of the survey.

File Attachment:

File Name: limesurvey...8356.lss
File Size:56.3 KB

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
7 years 2 months ago #170150 by holch
Please no double posts! this has already been discussed thoroughly in the German forum yesterday!
www.limesurvey.org/forum/german-forum/11...ragegruppen-zufällig

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
The topic has been locked.
More
7 years 2 months ago #170155 by zoe123
Thank you holch and tpartner for your help!!! :)

I double postet since i couldn`t find a solution in both forums, my problem is unfortunately not solved yet and thought it might as well help people who don't speak german and read it here.

@ tpartner thank you for your file. The file is working perfectly. I made in analogy all the changes in my survey

1 checked for unnecessary code in the equation
2 wrote "randnumber" instead of "rand"
3 put the randquestion within the first question group (Instructions)
4 and also found, that I always had randnumber =='1' instead of randnumber"1", so I changed that as well.
When I check the Syntax, I get no errors- but still, the preview is not showing me the question groups 2-19.

Do you or someone else have any other Ideas I could check???
The topic has been locked.
More
7 years 2 months ago #170157 by holch
export your .lss file again. I suspect that you did not change everything accordingly.

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose