Welcome to the LimeSurvey Community Forum

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

chose a certain number of question groups

  • zoe123
  • zoe123's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 9 months ago - 5 years 9 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: 5 years 9 months ago by zoe123.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 9 months ago - 5 years 9 months ago #170124 by tpartner
Replied by tpartner on topic chose a certain number of question groups
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: 5 years 9 months ago by tpartner.
The topic has been locked.
  • zoe123
  • zoe123's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 9 months ago #170126 by zoe123
Replied by zoe123 on topic chose a certain number of question groups
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?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 9 months ago - 5 years 9 months ago #170128 by tpartner
Replied by tpartner on topic chose a certain number of question groups
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: 5 years 9 months ago by tpartner.
The topic has been locked.
  • zoe123
  • zoe123's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 9 months ago #170129 by zoe123
Replied by zoe123 on topic chose a certain number of question groups
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.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 9 months ago #170130 by tpartner
Replied by tpartner on topic chose a certain number of question groups
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.
  • zoe123
  • zoe123's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 9 months ago #170132 by zoe123
Replied by zoe123 on topic chose a certain number of question groups
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.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 9 months ago #170133 by tpartner
Replied by tpartner on topic chose a certain number of question groups
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.
  • zoe123
  • zoe123's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 9 months ago #170135 by zoe123
Replied by zoe123 on topic chose a certain number of question groups
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.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 9 months ago #170136 by tpartner
Replied by tpartner on topic chose a certain number of question groups
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.
  • zoe123
  • zoe123's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 9 months ago #170137 by zoe123
Replied by zoe123 on topic chose a certain number of question groups
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.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 9 months ago #170142 by tpartner
Replied by tpartner on topic chose a certain number of question groups
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 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.

Lime-years ahead

Online-surveys for every purse and purpose