Showing X out of Y Questions in a Questiongroup

More
3 years 1 day ago - 3 years 1 day 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: 3 years 1 day ago by MichaelKl. Reason: Added Setting and Screenshot

Please Log in or Create an account to join the conversation.

More
3 years 1 day ago #131830 by tpartner
With array questions, try this:

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.

Please Log in or Create an account to join the conversation.

More
3 years 23 hours ago #131840 by MichaelKl
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:

Please Log in or Create an account to join the conversation.

More
3 years 3 hours ago #131854 by MichaelKl
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?

Please Log in or Create an account to join the conversation.

More
2 years 11 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:
sum(Q2_SQ001.relevanceStatus, Q3_SQ001.relevanceStatus, Q4_SQ001.relevanceStatus, Q5_SQ001.relevanceStatus) LT 3
This relevance equation for Q2:
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.
Attachments:

Please Log in or Create an account to join the conversation.

More
2 years 11 months ago #131909 by MichaelKl
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?

Please Log in or Create an account to join the conversation.

More
2 years 11 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.

Please Log in or Create an account to join the conversation.

More
2 years 11 months ago - 2 years 11 months ago #131912 by MichaelKl
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
Attachments:
Last edit: 2 years 11 months ago by MichaelKl.

Please Log in or Create an account to join the conversation.

More
2 years 11 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.

Please Log in or Create an account to join the conversation.

More
2 years 11 months ago #131915 by MichaelKl
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:

Please Log in or Create an account to join the conversation.

More
2 years 11 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.

Please Log in or Create an account to join the conversation.

More
2 years 11 months ago #131922 by MichaelKl
Well, looks like a bug.

Thanks for you help, though!

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!