Welcome, Guest
Username: Password: Remember me

TOPIC: Need a replacement for Ranking Question

Need a replacement for Ranking Question 7 months 3 weeks ago #106697

  • deliot
  • deliot's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 5
  • Karma: 0
First off, I love LimeSurvey and I'd like to thank all involved for it :cheer:

Second, We have a lot of issues with the LimeSurvey Ranking style question. While the JavaScript drag and drop is pretty, it is error prone. For example, when you first drag a box to the right side, it defaults to going above the last box placed. On the second drag, it defaults to BELOW the previous box. I believe this results in errors in rankings, or at the very least, a higher error rate than normal for this question type. No offense to the developers, it is a slick AJAX setup. But for "web challenged" users, it is problematic and I get a number of emails from survey users about it.

THE QUESTION: Is there a way to mimic the effect of a ranking question, using an Array question? So if the user ranks one particular row choice as #1, none of the other rows have that option available.

This is how SurveyMonkey does it, and I think it's a cleaner, more intuitive way of ranking, and less error prone.

Any advice would be appreciated, and I have coding experience... so if you point me in the right direction, I should be able to use code if necessary.
Attachments:
The administrator has disabled public write access.

Need a replacement for Ranking Question 7 months 3 weeks ago #106699

  • c_schmitz
  • c_schmitz's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 819
  • Thank you received: 116
  • Karma: 93
Use the 'Array by Column' question type.
Support us, too. Donate to the LimeSurvey project and help keep us going!
The administrator has disabled public write access.
The following user(s) said Thank You: deliot

Need a replacement for Ranking Question 7 months 3 weeks ago #106764

  • deliot
  • deliot's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 5
  • Karma: 0
I don't see how an Array By Column type replaces a Ranking Question. It would work if no two answers are allowed BOTH on the same ROW and COLUMN, but that is not the case. With a standard Array By Column question, I can have multiple items with the same Ranking.
The administrator has disabled public write access.

Need a replacement for Ranking Question 7 months 3 weeks ago #106770

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6551
  • Thank you received: 868
  • Karma: 257
Hi,

Take a Array question, put
unique(self)
in 'Question validation equation'


Example : limesurvey.sondages.pro/survey/index/sid...51/newtest/Y/lang/en
Last Edit: 7 months 3 weeks ago by DenisChenu.
The administrator has disabled public write access.
The following user(s) said Thank You: deliot

Need a replacement for Ranking Question 7 months 3 weeks ago #106826

  • deliot
  • deliot's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 5
  • Karma: 0
Thank you both for your kind responses.

Using unique(self) is a step closer to what I need, thank you, I will try that out.

I was wondering if there was a way to get closer to the SurveyMonkey "forced ranking matrix" seen here:

www.surveymonkey.com/s/3P7NBRG

Note that each row and each column must be unique. This insures that no two items are ranked with the same ranking score.

This is ideally what I am after.

Thanks for any help you can provide.
The administrator has disabled public write access.

Need a replacement for Ranking Question 7 months 3 weeks ago #106841

  • tpartner
  • tpartner's Avatar
  • NOW ONLINE
  • LimeSurvey Team
  • Posts: 4357
  • Thank you received: 826
  • Karma: 381
I'm assuming you are using LimeSurvey 2.05.

1) Create a normal array with no question validation.

2) Set up your survey to use JavaScript.

3) Add this script to the source of the array:
<script type="text/javascript" charset="utf-8">	
 
	$(document).ready(function() {
 
		// Identify this question
		var qID = {QID};
 
		// Answers are exclusive by column
		$('#question'+qID+' input[type="radio"]').click(function(event){
			var thisAnsCode = $(this).attr('id').split('-')[1];
			$('#question'+qID+' input[id$="-'+thisAnsCode+'"]').prop('checked', false);
			$(this).prop('checked', true);
		});
	});
</script>

Here's a working example:

File Attachment:

File Name: limesurvey_survey_883124.lss
File Size: 18 KB
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.
The following user(s) said Thank You: Sarques, deliot

Need a replacement for Ranking Question 7 months 3 weeks ago #106858

  • deliot
  • deliot's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 5
  • Karma: 0
Yes, I am using LimeSurvey 2.05...

This is exactly what I need, and I thank you very much for taking the time to create an example.

IMHO, this is a much cleaner way to do a ranking, and I think we will have A LOT less complaints about this type of ranking question in the future.

:cheer: :cheer:

Dan
The administrator has disabled public write access.

Need a replacement for Ranking Question 6 months 3 weeks ago #108053

  • Ben_V
  • Ben_V's Avatar
  • OFFLINE
  • Platinum Lime
  • Posts: 1146
  • Thank you received: 273
  • Karma: 79
For ranking question replacement there is another valid solution:

See attached sample "ls2_cascading_array_filter_exclude.lss"
(also available in the precious directory /docs/demosurveys of all LS packages ≥1.92)

File Attachment:

File Name: ls2_cascading_array_filter_exclude.lss
File Size: 36 KB
Benoît

goo.gl/Bw5iM => Recherche GG dans le forum français (remplacer "exemple" dans la barre de recherche)
goo.gl/WX8PH => GG search for english forum (Replace "example" in the search bar)
goo.gl/IxiGu => Búsqueda en el foro en español (Cambiar "ejemplo" en la barra de...
The administrator has disabled public write access.

Need a replacement for Ranking Question 5 months 4 weeks ago #109138

  • deliot
  • deliot's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 5
  • Karma: 0
Thank you for the assistance, but these examples do not match what I need. The answer provided by tpartner solved the problem for me very well.
The administrator has disabled public write access.

Need a replacement for Ranking Question 5 months 3 weeks ago #109263

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6551
  • Thank you received: 868
  • Karma: 257
tpartner wrote:
Create a normal array with no question validation.
Just one complement : here you can use unique(self)

Because we don't control only in javascript, but in PHP too.

For example, surveymonkey can be easily hacked see screen capture)
Attachments:
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.181 seconds
Donation Image