This way it won't work.
You try to have a randomization group on the first picture and another one on the second picture with the offer and the satisfaction without.
Either you redesign everything-
without all of your randomization groups.
You may use two hidden questions (QH1 and QH2) of type short text, where you create two random strings.
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 20 letters
var arr = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T"];
arr = shuffle(arr);
// Slice: take the first 10
anumbers = arr.slice(0,10).join('');
$('#question{QID} input[type="text"]').val(anumbers);
$('#question{QID}').hide();
});
</script>
Now you have two strings like
GAHKDC...
LFACENP...
in your first proposer questions you may display the image that corresponds to the first letter of the string
in your second proposer questions you may display the image that corresponds to the second letter of the string
in your third proposer questions you may display the image that corresponds to the third letter of the string
...
the same in your offer questions
here you use the second string.
Best to rename the images to "proposeA.jpg", "proposeB.jpg",...
and "offerA.jpg", "offerB.jpg"
You display the first image by
<img alt="" src="/limesurvey/upload/surveys/123456/images/offer{substr(QH1,0,1)}.JPG" />
You display the second image by
<img alt="" src="/limesurvey/upload/surveys/123456/images/offer{substr(QH1,1,1)}.JPG" />
Remember: the first index of "substr" is 0.
And as you have your strings saved you know exactly which combination was displayed first, second, and so on.
Or - in my opinion - better, shorter - you use the solution you have in your prototype questions.
But I do not know why you changed the javascript in "prototype3" to "prototype5"
Joffm