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
  • MichaelKl's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 2 months ago - 8 years 2 months ago #131824 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.
Attachments:
Last edit: 8 years 2 months ago by MichaelKl. Reason: Added Setting and Screenshot
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 2 months ago #131830 by tpartner
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
  • MichaelKl's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 2 months 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?
Attachments:
The topic has been locked.
  • MichaelKl
  • MichaelKl's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 2 months 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?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 2 months ago #131904 by tpartner
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:
Code:
sum(Q2_SQ001.relevanceStatus, Q3_SQ001.relevanceStatus, Q4_SQ001.relevanceStatus, Q5_SQ001.relevanceStatus) LT 3
This relevance equation for Q2:
Code:
sum(Q1_SQ001.relevanceStatus, Q3_SQ001.relevanceStatus, Q4_SQ001.relevanceStatus, Q5_SQ001.relevanceStatus) LT 3
...

Sample survey attached:

File Attachment:

File Name: limesurvey...8123.lss
File Size:37 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.
  • MichaelKl
  • MichaelKl's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 2 months 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?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 2 months ago #131911 by tpartner
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
  • MichaelKl's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 2 months ago - 8 years 2 months 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
Last edit: 8 years 2 months ago by MichaelKl.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 2 months ago #131913 by tpartner
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
  • MichaelKl's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 2 months 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
Attachments:
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 2 months ago #131921 by tpartner
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
  • MichaelKl's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 2 months 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!
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose