- Posts: 8
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Showing X out of Y Questions in a Questiongroup
- MichaelKl
- Topic Author
- Offline
- New Member
Less
More
8 years 4 weeks ago - 8 years 4 weeks ago #131824
by MichaelKl
Showing X out of Y Questions in a Questiongroup was created by MichaelKl
Hi,
i have a question group including 15 questions. I want randomly show only 7 of them randomly.
What I did so far:
Each question in the question group is in the same random-group. Hence, they are shown randomly.
I couldn't sove the second part:
Unfortunately I was not able to solve it based on previous topics (for instance www.limesurvey.org/forum/can-i-do-this-w...stion-out-of-a-group ).
I guess, it is because I use Matrix-Questions.
Setting:
Version: LS: 2.5
Questiontype: Matrix
Question 1 (Code): BLANK
Question 2 (Code): DEFAULT
Question 3 (Code): LABEL
Attached is the relevance equation for question 1
I do hope that anyone can help me out. Thanks in advance.
i have a question group including 15 questions. I want randomly show only 7 of them randomly.
What I did so far:
Each question in the question group is in the same random-group. Hence, they are shown randomly.
I couldn't sove the second part:
Unfortunately I was not able to solve it based on previous topics (for instance www.limesurvey.org/forum/can-i-do-this-w...stion-out-of-a-group ).
I guess, it is because I use Matrix-Questions.
Setting:
Version: LS: 2.5
Questiontype: Matrix
Question 1 (Code): BLANK
Question 2 (Code): DEFAULT
Question 3 (Code): LABEL
Attached is the relevance equation for question 1
I do hope that anyone can help me out. Thanks in advance.
Attachments:
Last edit: 8 years 4 weeks ago by MichaelKl. Reason: Added Setting and Screenshot
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10612
- Thank you received: 3691
8 years 3 weeks ago #131830
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Showing X out of Y Questions in a Questiongroup
With array questions, try this:
Code:
sum(that.DEFAULT.relevanceStatus, that.LABEL.relevanceStatus) LT 2
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- MichaelKl
- Topic Author
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
8 years 3 weeks ago #131840
by MichaelKl
Replied by MichaelKl on topic Showing X out of Y Questions in a Questiongroup
It works partly in a sense that all questions of the matrix are automatically included in that statement.
However, when testing the survey, the questions do not apper anymore (see attachment).
Any ideas?
However, when testing the survey, the questions do not apper anymore (see attachment).
Any ideas?
Attachments:
The topic has been locked.
- MichaelKl
- Topic Author
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
8 years 3 weeks ago #131854
by MichaelKl
Replied by MichaelKl on topic Showing X out of Y Questions in a Questiongroup
Can anyone tell me how to check, if "relevanceStatus" works for a Matrix?
Meaning, how to "debug" that.matrixQuestion.relevanceStatus?
Is there any chance to just include it in the html output text?
Meaning, how to "debug" that.matrixQuestion.relevanceStatus?
Is there any chance to just include it in the html output text?
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10612
- Thank you received: 3691
8 years 3 weeks ago #131904
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Showing X out of Y Questions in a Questiongroup
Hmm...can't really explain the logic but targeting the relevance of a sub-question rather than the whole question seems to work.
So if, for example, I have a group with 5 array questions:
- Question codes - Q1, Q2, Q3, Q4, Q5
- Sub-question codes - SQ001, SQ002...
- All questions have been assigned the same randomization group
To show a random 3 of the 5, I use this relevance equation for Q1:
This relevance equation for Q2:
...
Sample survey attached:
So if, for example, I have a group with 5 array questions:
- Question codes - Q1, Q2, Q3, Q4, Q5
- Sub-question codes - SQ001, SQ002...
- All questions have been assigned the same randomization group
To show a random 3 of the 5, I use this relevance equation for Q1:
Code:
sum(Q2_SQ001.relevanceStatus, Q3_SQ001.relevanceStatus, Q4_SQ001.relevanceStatus, Q5_SQ001.relevanceStatus) LT 3
Code:
sum(Q1_SQ001.relevanceStatus, Q3_SQ001.relevanceStatus, Q4_SQ001.relevanceStatus, Q5_SQ001.relevanceStatus) LT 3
Sample survey attached:
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
The topic has been locked.
- MichaelKl
- Topic Author
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
8 years 3 weeks ago #131909
by MichaelKl
Replied by MichaelKl on topic Showing X out of Y Questions in a Questiongroup
Hi tpartner,
thanks. That helped a lot.
However, it only works when you present your survey on a single page (I also tested your version). If you change the presentation to "group by group" its not working anymore (matrix is not visible).
Any ideas how to use it in a "group by group" or "question by question" survey?
thanks. That helped a lot.
However, it only works when you present your survey on a single page (I also tested your version). If you change the presentation to "group by group" its not working anymore (matrix is not visible).
Any ideas how to use it in a "group by group" or "question by question" survey?
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10612
- Thank you received: 3691
8 years 3 weeks ago #131911
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Showing X out of Y Questions in a Questiongroup
The survey I sent IS in group-by-group mode and works for me.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- MichaelKl
- Topic Author
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
8 years 3 weeks ago - 8 years 3 weeks ago #131912
by MichaelKl
Replied by MichaelKl on topic Showing X out of Y Questions in a Questiongroup
What about question-by-question mode?
edit: I added a screenshot using your survey using question-by-question mode (Matrix is not visible)
Thats exactly the problem I have with my survey
edit: I added a screenshot using your survey using question-by-question mode (Matrix is not visible)
Thats exactly the problem I have with my survey
Attachments:
Last edit: 8 years 3 weeks ago by MichaelKl.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10612
- Thank you received: 3691
8 years 3 weeks ago #131913
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Showing X out of Y Questions in a Questiongroup
Why did you say "If you change the presentation to "group by group" its not working anymore (matrix is not visible)."?
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- MichaelKl
- Topic Author
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
8 years 3 weeks ago #131915
by MichaelKl
Replied by MichaelKl on topic Showing X out of Y Questions in a Questiongroup
I attached a new picture with 2 scenarios:
1) Using Question-by-Question Setting: Matrix is not visible
2) All on one page: all works fine
1) Using Question-by-Question Setting: Matrix is not visible
2) All on one page: all works fine
Attachments:
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10612
- Thank you received: 3691
8 years 3 weeks ago #131921
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Showing X out of Y Questions in a Questiongroup
Sorry, I don't have a solution for question-by-question. You may want to
file a bug report
.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- MichaelKl
- Topic Author
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
8 years 3 weeks ago #131922
by MichaelKl
Replied by MichaelKl on topic Showing X out of Y Questions in a Questiongroup
Well, looks like a bug.
Thanks for you help, though!
Thanks for you help, though!
The topic has been locked.