Ranking questions with multiple groups

More
2 months 5 days ago #196059 by FSoave
Hello,
I have a list of sentences and I have to ask a user to group them "freely" (at least 3 groups, max 10 groups).

Basic example (simplest case possible, 3 groups)

these options: A1,C1,B2,A3,C3,A2,C2,B1,B3

could be grouped in 3 groups by the letter: (A1, A2, A3) - (B1, B2, B3) - (C1, C2, C3)

How can I achieve this assuming each option can only be contained in 1 group?

The only idea I have (not sure if doable) is:

I have 10 questions with my options. The first 3 are mandatory. The questions are in subsequent pages.
Each question only contains options that were not previously selected.
Can I filter the options based on what was previously selected?

Any suggestion?

Thanks!

Please Log in to join the conversation.

LimeSurvey Partners
More
2 months 5 days ago #196066 by Joffm

Each question only contains options that were not previously selected.


Buzzword: Array filter exclusion

Start with a multiple question with ALL your sentences.
Respondents select options for first "group".
Display by "Array filter exclusion" only the not selected options in the next question.
Respondents select options for second "group".
Display by "Array filter exclusion" only the not selected options in the next question.
Respondents select options for third "group".
And so on.
If there is nothing left to distribute, skip to rest of the questionnaire.

It's an idea, have a look.

File Attachment:

File Name: limesurvey...7825.lss
File Size:45 KB


An other option is to use something like the question theme cardsort.
https://github.com/tpartner/LimeSurvey-Card-Sorting-3.x
Depends on the length of your items.


Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Attachments:
The following user(s) said Thank You: FSoave

Please Log in to join the conversation.

More
2 months 4 days ago #196088 by FSoave
Thanks for the guidance! I have used the card-sorting 3.x. I've made a fork with some customization for longer sentences ( github.com/francescosoave/LimeSurvey-Card-Sorting-3.x )

I have another question somehow related. Can I bring all the values - as they were grouped by the user - in my next page?

Basically First I let the user organize the options in the groups, but then I'd like to have another page which displays the grouping done by the user along with a text field for each group, for the user to describe what they've done. Do you think it's possible?
Thanks!

Please Log in to join the conversation.

More
2 months 4 days ago - 2 months 4 days ago #196093 by tpartner
Yes, if using the Card-Sorting question, you can use ExpressionScript (Expression Manager) to pipe in the items placed in each category.

Unfortunately, ExpressionScript does not support arrays or looping and the sumifop() function is horribly buggy so the piping gets a little verbose, but something like this if using the demo survey from the my GitHub page.

<div>
	<h4>You listed {if(sum(q1_1 == '1', q1_2 == '1', q1_3 == '1', q1_4 == '1', q1_5 == '1', q1_6 == '1', q1_7 == '1', q1_8 == '1') > 0, 'the following', 'no')} items as "Very Important"</h4>
	<ul>
		{if(q1_1 == '1', '<li>'+q1_1.question+'</li>', '')}
		{if(q1_2 == '1', '<li>'+q1_2.question+'</li>', '')}
		{if(q1_3 == '1', '<li>'+q1_3.question+'</li>', '')}
		{if(q1_4 == '1', '<li>'+q1_4.question+'</li>', '')}
		{if(q1_5 == '1', '<li>'+q1_5.question+'</li>', '')}
		{if(q1_6 == '1', '<li>'+q1_6.question+'</li>', '')}
		{if(q1_7 == '1', '<li>'+q1_7.question+'</li>', '')}
		{if(q1_8 == '1', '<li>'+q1_8.question+'</li>', '')}
	</ul>
 
	<h4>You listed {if(sum(q1_1 == '2', q1_2 == '2', q1_3 == '2', q1_4 == '2', q1_5 == '2', q1_6 == '2', q1_7 == '2', q1_8 == '2') > 0, 'the following', 'no')} items as "Fairly Important"</h4>
	<ul>
		{if(q1_1 == '2', '<li>'+q1_1.question+'</li>', '')}
		{if(q1_2 == '2', '<li>'+q1_2.question+'</li>', '')}
		{if(q1_3 == '2', '<li>'+q1_3.question+'</li>', '')}
		{if(q1_4 == '2', '<li>'+q1_4.question+'</li>', '')}
		{if(q1_5 == '2', '<li>'+q1_5.question+'</li>', '')}
		{if(q1_6 == '2', '<li>'+q1_6.question+'</li>', '')}
		{if(q1_7 == '2', '<li>'+q1_7.question+'</li>', '')}
		{if(q1_8 == '2', '<li>'+q1_8.question+'</li>', '')}
	</ul>
 
	<h4>You listed {if(sum(q1_1 == '3', q1_2 == '3', q1_3 == '3', q1_4 == '3', q1_5 == '3', q1_6 == '3', q1_7 == '3', q1_8 == '3') > 0, 'the following', 'no')} items as "Not very important"</h4>
	<ul>
		{if(q1_1 == '3', '<li>'+q1_1.question+'</li>', '')}
		{if(q1_2 == '3', '<li>'+q1_2.question+'</li>', '')}
		{if(q1_3 == '3', '<li>'+q1_3.question+'</li>', '')}
		{if(q1_4 == '3', '<li>'+q1_4.question+'</li>', '')}
		{if(q1_5 == '3', '<li>'+q1_5.question+'</li>', '')}
		{if(q1_6 == '3', '<li>'+q1_6.question+'</li>', '')}
		{if(q1_7 == '3', '<li>'+q1_7.question+'</li>', '')}
		{if(q1_8 == '3', '<li>'+q1_8.question+'</li>', '')}
	</ul>
</div>





Sample survey:

File Attachment:

File Name: limesurvey...5561.lss
File Size:22 KB

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
Attachments:
Last edit: 2 months 4 days ago by tpartner.
The following user(s) said Thank You: FSoave

Please Log in to join the conversation.

More
2 months 4 days ago #196107 by FSoave
thanks a lot! I'll try to implement it later.
Also, I need to display a text box for each group as the user should write justification about their choices. Can I do it dynamically (eg display 1 text-box for each non-empty group)?

Since you are the dev, I have another question for you about your theme. Is there a way to make only some groups mandatory? For example, with your demo, say I need the groups "very important" and "fairly important" to be mandatory (where mandatory means at least 1 item for each group).

Thanks!

Please Log in to join the conversation.

More
2 months 4 days ago #196113 by Joffm
Hi,
as you see in the answer table for each item (in your case "sentence") the number of the group is stored.
So you might validate
countifop("==","1",self.NAOK)>0 AND countifop("==","2",self.NAOK)>0
meaning: both "group 1" and "group 2" have a count >0

Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: tpartner

Please Log in to join the conversation.

More
2 months 4 days ago #196118 by FSoave
Hi thanks,
I've read on the manual and I understand the expression..but I'm can't seem to find the "answer table for each item" you mentioned..what/where is it..? ..attached my survey so you can see what I'm doing.
Attachments:

Please Log in to join the conversation.

More
2 months 4 days ago #196120 by Joffm
Hi,
not: in the answer table for each item (in your case "sentence") the number of the group
but: in the answer table for each item (in your case "sentence") the number of the group

Unfortunately language is not assoziative.
It's a difference between Girls (trading school) and (Girls trading) school. ;)

Okay,
here you see some items of the cardsort. And the stored value is the number of the group.


Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Attachments:

Please Log in to join the conversation.

More
2 months 4 days ago #196122 by FSoave

Joffm wrote: H

Okay,
here you see some items of the cardsort. And the stored value is the number of the group.


Sorry but I'm getting confused now :unsure: . Where is this screenshot taken from? I can't find it
Thanks

Please Log in to join the conversation.

More
2 months 3 days ago #196160 by FSoave
Sorry I realized maybe I wasn't clear above :)
I was just asking where (in which part of limesurvey) is the field in which I should specify the conditional expression countifop("==","1",self.NAOK)>0 AND countifop("==","2",self.NAOK)>0


Thanks

Please Log in to join the conversation.

More
2 months 3 days ago #196163 by FSoave
ok sorry again, I've managed to find the right place for the equation and it's working!

Edit question -> Logic -> Question validation equation

I can't edit the previous posts, sorry for the mess.

Thanks!

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now