Hi, Marika
here the promised example.
First:
In the first question of the master survey there is the definition of the video games.
I reduced it to 5 (numbers.slice(0,
5)), so it is easier to test. You have to change that later.
Code:
<script type="text/javascript" charset="utf-8">
$(document).on('ready pjax:scriptcomplete',function(){
const numbers = [ ...Array(250).keys() ].map(num => num + 1);
numbers.sort(() => Math.random() - 0.5);
$('#question{QID} input[type="text"]').val(numbers.slice(0, 5));
$('#question{QID}').hide();
});
</script>
The result will be:
You get two datasets which are linked by the SAVEDID (in master it's "id", in slave it's "pSAVE")
The column VG in master is only exported to check.
You see in slave the rated video ID and the answers to your six questions.
Here the surveys.
check that the end-urls are correct; both you have to adapt.
In master:
https://
www.yourServer.de/limesurvey
/index.php/
[surveyID_of_slave]?pSAVE={SAVEDID}&pVIDEO={VG},&newtest=Y
The comma after {VG} is mandatory, not a typo.
In slave there is an equation to set the end-url (eURL)
{if(!is_empty(rVIDEO),"
www.yourServer.de/limesurvey/index.php/{..."+rVIDEO+"&newtest=Y
","")}
Meaning: only if there are more video games to rate the end-url links back to the survey, otherwise the end-url is empty and the survey is finished.
Only works if both surveys are activated.
Master can be open or closed, but slave has to be an opn survey.
By the way: How are you going to display the video games?
The name of the game? Or a picture of the cover?
Name could be difficult because it needs a very long equation to micro-taylor this.
Picture is better: rename the pictures to "videogame[number].jpg" Then it is possible to insert it dynamically.
Even if you display names; transfer the name to a picture.
Best regards
Joffm