Hi,
I'd do it this way.
1. Create a question of type "short text". You may call it "pool".
2. In the source code insert this javascript snippet
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 with 14 characters
var arr = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N"];
// Shuffle the array
arr = shuffle(arr);
arrfinal = arr.slice(0,7).join(',');
$('#question{QID} input[type="text"]').val("#"+arrfinal);
// Hide the question
$('#question{QID}').hide();
});
</script>
Means: You create an array with 14 characters, shuffle it and take the first seven characters which you insert into the text of the question
You will get something like
#C,N,I,E,B,F,H
3. All your 14 questions get the same "randomization group name" to display them in randomized order.
By relevance equation display the questions.
Use the function "strpos" to decide if a character is in the string or not.
[url]
www.limesurvey.org/manual/ExpressionScri...mplemented_functions
[/url]
The "a" questions if the character is IN the string
The "b" questions if the character is NOT IN the string.
Like
Question 1a: strpos(pool,"A")>0
Question 1b: strpos(pool,"A")==0
Question 2a: strpos(pool,"B")>0
Question 2b: strpos(pool,"B")==0
...
Question 14a: strpos(pool,"N")>0
Joffm