Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:

THEMA: Capturing randomization order

Capturing randomization order 7 Monate 3 Wochen her #102039

  • itsdanwall
  • itsdanwalls Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 2
  • Karma: 0
I am trying to determine if the question order and the order of answer options for the attached survey. There is randomization on which side each answer option is presented (via the "Random order: Randomize on each page load" within the question options). Further the questions themselves are presented in a random order (via the "Randomization group" within the question group options). I would like to be able to capture both the side of the answer options were presented on and the order which the questions were presented. Is there a way to do this in LimeSurvey?

Note: I used the "copy_of_default.zip" template to make List(radio) questions appear horizontally.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Capturing randomization order 7 Monate 3 Wochen her #102047

  • holch
  • holchs Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 2549
  • Dank erhalten: 285
  • Karma: 102
without having had a look at your files, I'd say no, not out of the box. At least I am not aware of any feature like this.

Maybe one can do something with Javascript writing the order into a hidden question field, but I think this will be quite complicated.

Would be great if anyone could proof me wrong though...

But this would probably require an additional column in the database for each question and each answer item, which would bring us quickly to the column limits of the database engines, especially for bigger surveys and/or long item lists, where the randomization is most important.
Have a look at the manual! It is a really valuable source for information. Here some helpful links:
Manual (EN) | Question Types | Question Attributes | Workarounds

If you found this answer helpful and it saved you some time please consider a donation to the project to keep Limesurvey going!
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Capturing randomization order 7 Monate 2 Wochen her #102334

  • itsdanwall
  • itsdanwalls Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 2
  • Karma: 0
Do you know of any resources for me to begin to understand how to use JavaScript to write the random order to a hidden question field?
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Capturing randomization order 7 Monate 2 Wochen her #102345

  • holch
  • holchs Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 2549
  • Dank erhalten: 285
  • Karma: 102
Sorry, I am not a Javascript expert.
Have a look at the manual! It is a really valuable source for information. Here some helpful links:
Manual (EN) | Question Types | Question Attributes | Workarounds

If you found this answer helpful and it saved you some time please consider a donation to the project to keep Limesurvey going!
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Capturing randomization order 7 Monate 2 Wochen her #102364

  • tpartner
  • tpartners Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 4050
  • Dank erhalten: 740
  • Karma: 341
To record the group display order, you can add a hidden equation type question to each group and load it with the equation below. This records the sequential number of the group (I have added 1 so the sequence starts at 1)
{self.gseq + 1}


Recording the radio answer order is a little trickier...

1) Set up your survey to use JavaScript.

2) Add a short-text question to each group (we'll hide them with JavaScript).

3) Add the following script to the source of each short-text. This script:
- Hides the short-text question
- Loops through the radio options as displayed
- Records a comma-separated list of their answer IDs in the short-text
<script type="text/javascript" charset="utf-8">	
 
	$(document).ready(function(){
 
		// Identify some stuff
		var qHiddenID = {QID}; // The hidden question ID
		var qHidden = $('#question'+qHiddenID); // The hidden question
		var q1 = $('div.list-radio:eq(0)'); // First radio question on the page
		var q1ID = $(q1).attr('id').split('question')[1]; // The first radio question ID
		var gID = $('input.text', qHidden).attr('id').split('X')[1]; // The group ID
 
		// Hide this question
		$(qHidden).hide();
 
		// Build an array of the Q1 answers
		var answersArr = new Array();
		$('input.radio', q1).each(function(i){
			var answerID = $(this).attr('id').split('X'+gID+'X'+q1ID)[1];
			answersArr.push(answerID);
		});
 
		// Load the array into the hidden question
		$('input.text', qHidden).val(answersArr);
	});
</script>


Here's your sample survey back with these modifications:

Dateianhang:

Dateiname: limesurvey_survey_186812_modified.lss
Dateigröße: 37 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.
Letzte Änderung: 7 Monate 2 Wochen her von tpartner.
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Folgende Benutzer bedankten sich: trivender
Moderatoren: ITEd
Ladezeit der Seite: 0.156 Sekunden
Donation Image