Sub questions in the wrong order

More
1 month 4 days ago #190713 by AdaSimion
Hello,

Before finalising the survey, we encountered a problem.

The sub questions are not in the right order. They appear as SQ4, SQ2, SQ3, SQ1.

This happened after we divided 100 questions in groups of 10/10/5/75 questions. The group with 75 questions has a group relevance of 0.
We previously used also a randomization group.

The problem with the sub questions applies only to the group with 75 questions, the other 25 appear in the right order.

If you would have any suggestion about what might cause this and how to solve it, it would be greatly appreciated.

Thank you very much.

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

LimeSurvey Partners
More
1 month 4 days ago #190719 by holch
Usually sub questions are in the order that you put them, so I don't really understand the problem here.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds
The following user(s) said Thank You: DenisChenu

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

More
1 month 4 days ago #190722 by AdaSimion
Thank you for your answer!

This is exactly what confuses me as well. In the sub questions menu they are in the right order.
When I go in "edit sub questions" they always start with SQ1.

But they are displayed in the wrong order, only for the questions that have a group relevance of 0.

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

More
1 month 4 days ago #190726 by jelo
Create a new survey with just two groups and two questions.
Is the issue still there? If yes, export the survey as LSS and attach it here.
If not, you might have some leftovers from reorganizing the survey.
I would try to recreate parts with issues to see if they vanish after recreation.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users

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

More
1 month 3 days ago #190735 by AdaSimion
Thank you for your answers.

I am attaching one of the surveys.
Attachments:

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

More
1 month 3 days ago #190751 by holch
So you put a LSS file with 4 question groups and a total of 99 questions for us to find where the problem is? I am getting a neuro flash...

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

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

More
1 month 3 days ago #190752 by holch
The last group seems to be where you see the problems.

However, this group has a group relevance of "0", so actually no one should see them anyway...

But, I had a look at it. This is how the subquestions are defined:



So looks correct.

And this is how they display in the preview:



Looks also correct.

So please specify what your problem is, because I can't see any.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds
Attachments:

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

More
1 month 3 days ago #190757 by jelo
What version of LimeSurvey is used?

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users

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

More
1 month 3 days ago #190762 by tpartner
I am seeing some order discrepancies using the latest version.

There is JS in the question source but I don't think that's the problem. Have you applied JavaScript anywhere else?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com

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

More
1 month 3 days ago #190765 by jelo

tpartner wrote: I am seeing some order discrepancies using the latest version.

Some? Can you give me a Questioncode where you see an issue? And one without an issue?

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users

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

More
1 month 3 days ago #190767 by AdaSimion
I apologize for sending the attachment with no explanation.

I am now in the position where I can't access the survey, and that is why I just sent the attachment that I had on the phone, but am unable to open.

Although the group has a relevance of 0, our aim was to set it up in a manner that out of these 100 words, participants would see 25, that are picked at random (also out of the 75)

The only reason why we created these groups, and added a group relevance of 0 is because we didn't want all 25 words to be shown on the same page, and we wanted to have maximum 10 questions per page.

The problem appeared after having changed this.

The version is 3.19.3.

I am attaching some images that show the problem better.

We have a total of 8 surveys exactly like the one attached, only with different words. The pictures are from a different survey, that I am also attaching here. The problem is consistent across all 8.

It mostly creates problems because the images do not correspond with the dimension, otherwise the order wouldn't be so important.
Attachments:

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

More
1 month 3 days ago #190768 by AdaSimion
The question code can be seen in the screen shot attached below.

From what I could tell, the groups containing either 10 or 5 questions are okay, and the sub questions are in order.

The only group that causes problems is the one with 75 questions.

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

More
1 month 3 days ago #190791 by tpartner
@AdaSimion, please file a bug report including your sample survey.

In the meantime, a workaround would be to place this script in the source of every group description. It will reposition the array rows according to the sequential sub-question codes.

<script type="text/javascript" charset="utf-8">
 
	$(document).on('ready pjax:scriptcomplete',function(){
 
		// Loop through the questions
		$('.array-flexible-row').each(function(i){
 
			var qID = $(this).attr('id').replace(/question/, '');
			var thisQuestion = $('#question'+qID);
 
			// Loop through the sub-question codes
			var i;
			for (i = 1; i < 5; i++) {
 
				var thisRow = $('tr[id^="javatbd"][id$="X'+qID+'SQ00'+i+'"]');
 
				// Reposition the corresponding array row
				$('table.subquestion-list tbody:eq(0)', thisQuestion).append(thisRow);
 
				// Fix the row class
				$(thisRow).removeClass('ls-even, ls-odd');
				if(i % 2 == 0) {
					$(thisRow).addClass('ls-even ');
				}
				else {
					$(thisRow).addClass('ls-odd ');
				}
			} 
		});
    });
</script>

Sample survey attached:

File Attachment:

File Name: limesurvey...8571.lss
File Size:690 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:
The following user(s) said Thank You: AdaSimion

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!