only difference with this survey is, that the question groups consist of two questions in stead of one.
And exactly this is the problem.
What you did before:
Two groups, one visible, one hidden
Questions all in the same randomization group.
Result
Now all questions are shuffled among the two groups and those questions who are in the visible group are displayed.
What you do now.
18 groups, 6 visible, 12 hidden
Groups are in the same randomization group.
Result
All groups are shuffled, but always the six visible groups are displayed. The groups are not shuffled in some kind of "hyper-group"
But I wrote before how to solve this
Create six unique random numbers (1-108) and display the groups which match these numbers by relevance.
Okay, let's start.
In a question of type "short text" you enter this script (both languages)
Code:
<script type="text/javascript" charset="utf-8">
function shuffle(array) {
var currentIndex = array.length, temporaryValue, randomIndex;
// While there remain elements to shuffle...
while (0 !== currentIndex) {
// Pick a remaining element...
randomIndex = Math.floor(Math.random() * currentIndex);
currentIndex -= 1;
// And swap it with the current element.
temporaryValue = array[currentIndex];
array[currentIndex] = array[randomIndex];
array[randomIndex] = temporaryValue;
}
return array;
}
$(document).on('ready pjax:scriptcomplete',function(){
// Fill the array ; here you have to change to 109
var arr = ;
for (var i = 1; i < 19; i++) {
arr.push(i);
}
arr = shuffle(arr).slice(0,6).join('-'); // we capture the first six elements of the shuffled array
$('#question{QID} input[type="text"]').val('#-'+arr+'-');
$('#question{QID}').hide();
});
</script>
You will get something like this
Now you display the six groups with the condition
Does the string contain the number
Function:
strpos(Q0,'-1-')>0
strpos(Q0,'-2-')>0
strpos(Q0,'-3-')>0
...
strpos(Q0,'-108-')>0
That's all. Remove the randomization group name from the questions.
But if you want to randomize the display of groups set the randomization group name here (as I did in the sample)
And here your sample back.
Now something else:
I see this is the "yearly" TUE survey "Openbare vervoer"
Many of your fellow students in previous years worked on these surveys.
You see you created a HTML table in the question text but did not insert the radio buttons into it
So why don't you use their expereience
There is a survey of a user (here:qiangqi)
[url]
forums.limesurvey.org/forum/design-issue...swer?start=24#232539
[/url]
And another thread of xueting
[url]
forums.limesurvey.org/forum/can-i-do-thi...oice-question#216461
[/url]
Joffm
These experiments only have different values of the options.
So you could shorten your entire survey by "tayloring"
This means: Only 6 x 2 questions, the values entered by ExpressionScript.
To do that:
Enter the values of all 108 experiments in a structured way into a question of type long text.
Create the six random questions
Capture the resp values with some string functions (strpos, substr) and display by ExpressionScript