The LimeSurvey Fund-Raiser 2012 is complete. Thank you for donating a total of 25,000 USD!     List of donors »

Welcome, Guest
Username: Password: Remember me

TOPIC: random order of answer categories, except for...

Re: random order of answer categories, except for... 7 months 1 week ago #86690

  • arielmosto
  • arielmosto's Avatar
  • OFFLINE
  • Gold Donor
  • Posts: 10
  • Karma: 0
Dear Tony:

I need the same for the Ranking question type.

Is that possible?
I tried this same code, but does not work.

Thank you very much ! Regards ! Ariel
The administrator has disabled public write access.

Re: random order of answer categories, except for... 7 months 1 week ago #86691

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 2853
  • Thank you received: 423
  • Karma: 243
Ariel, this thread is getting a little convoluted. Do you want to randomize all choices except except the last one or all except the first one.
Cheers,
Tony

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Re: random order of answer categories, except for... 7 months 1 week ago #86692

  • arielmosto
  • arielmosto's Avatar
  • OFFLINE
  • Gold Donor
  • Posts: 10
  • Karma: 0
Dear Tony, thanks.

I need to randomize all choices except the last one.

Regards !
The administrator has disabled public write access.

Re: random order of answer categories, except for... 7 months 1 week ago #86697

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 2853
  • Thank you received: 423
  • Karma: 243
I think the easiest way to achieve that would be to...

1) Append the answer code of the last item with "_l"
Capture11.JPG


2) In the ranking question, set "Random answer order" to "Yes"
Capture22.JPG


3) Add the following script to the source of the ranking question. Replace "QQ" with the ranking question ID.
<script type="text/javascript" charset="utf-8">
 
	$(document).ready(function() {
 
		var qID = QQ;
 
		$('#question'+qID+' .rank.label select').append($('#question'+qID+' .rank.label option[value$="_l"]'));
	});
 
</script>
Cheers,
Tony

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.
Moderators: DenisChenu, ITEd
Time to create page: 0.194 seconds
Donation Image