Hi,
I assume tht in the meantime you have a pool of all here given solutions in Eindhoven.
I should do it like this:
In a question of type "short text" you create a string of 8 characters in random order.
Code:
<script type="text/javascript" charset="utf-8">
$(document).on('ready pjax:scriptcomplete',function(){
// Identify this question
var thisQuestion = $('#question{QID}');
// Create an array of possible numbers
var numbers = [1,2,3,4,5,6,7,8];
// Shuffle the numbers array
shuffleArray(numbers);
var n1=numbers.join();
var n2=n1.replace(/,/g, '');
$('input:text', thisQuestion).val(n2);
});
// A function to shuffle arrays
function shuffleArray(array) {
for (var i = array.length - 1; i > 0; i--) {
var j = Math.floor(Math.random() * (i + 1));
var temp = array[i];
array[i] = array[j];
array[j] = temp;
}
return array;
}
</script>
This will give you a string like "62857341"
Now if you rename your videos to something like "video1.mp4", "video2.mp4" you can select the videos as "video{substr(Q0,0,1)}.mp4" which will result in "video6.mp4".
And the next as "video{substr(Q0,1,1)}.mp4"
Joffm