Only some remarks:
1. Some more words about the "longer" multiple text.
Like this
And also the other questions of this type, like "EXPRandHours", "EXPRandControl",...
You only have to extend the script
Code:
// Identify this question
var thisQuestion = $('#question{QID}');
var input1 = $('input:text:eq(0)', thisQuestion);
var input2 = $('input:text:eq(1)', thisQuestion);
var input3 = $('input:text:eq(2)', thisQuestion);
var input4 = $('input:text:eq(3)', thisQuestion);
var input5 = $('input:text:eq(4)', thisQuestion);
// and so on
Code:
// Only load random numbers once
if($.trim($(input1).val()) == '' && $.trim($(input2).val()) == '' && $.trim($(input3).val()) == '' && $.trim($(input4).val()) == '') {
Code:
shuffleArray(numbers);
$(input1).val(numbers[0]).trigger('keyup');
$(input2).val(numbers[1]).trigger('keyup');
shuffleArray(numbers);
$(input3).val(numbers[0]).trigger('keyup');
$(input4).val(numbers[1]).trigger('keyup');
shuffleArray(numbers);
$(input5).val(numbers[0]).trigger('keyup');
$(input6).val(numbers[1]).trigger('keyup');
// and so on
2. Then I saw that "EXPRandHours" is equally calculated in each group. So it should be sufficient to calculate it once before the Expriment starts.
There may be more of these calculations, e.g. "ActHours"
They all are calculated the same way, no matter for all random numbers from 1-7.
3. This is a really small thing.
In your nested IFs you write
{if(Hours.NAOK <= 17, 15, if(Hours.NAOK >= 18 && Hours.NAOK <= 22, 20,if(Hours.NAOK >= 23 && Hours.NAOK <= 27, 25, if(Hours.NAOK >= 28 && Hours.NAOK <= 32, 30,if(Hours.NAOK >= 33 && Hours.NAOK <= 37, 35, if(Hours.NAOK >= 38 && Hours.NAOK <= 42, 40, if(Hours.NAOK >= 43 && Hours.NAOK <= 47, 45, if(Hours.NAOK >= 48 && Hours.NAOK <= 52, 50,if(Hours.NAOK >= 53 && Hours.NAOK <= 57, 55,60)))))))))}
You see, the IF-statement has the syntax "if(condition,TRUE part, FALSE part)"
{if(Hours.NAOK <= 17,
15,
if(Hours.NAOK >= 18 && Hours.NAOK <= 22, 20,if(Hours.NAOK >= 23 && Hours.NAOK <= 27, 25, if(Hours.NAOK >= 28 && Hours.NAOK <= 32, 30,if(Hours.NAOK >= 33 && Hours.NAOK <= 37, 35, if(Hours.NAOK >= 38 && Hours.NAOK <= 42, 40, if(Hours.NAOK >= 43 && Hours.NAOK <= 47, 45, if(Hours.NAOK >= 48 && Hours.NAOK <= 52, 50,if(Hours.NAOK >= 53 && Hours.NAOK <= 57, 55,60)))))))))}
You see, "
15" is the TRUE part of the first condition,
the rest the FALSE part.
Therefore it is not necessary to use this AND construct:
if(Hours.NAOK >= 18 && Hours.NAOK <= 22
"Hours" is always greater than 17. Otherwise the first part of the IF-statement would have been TRUE.
So this is sufficient:
{if(Hours.NAOK <= 17, 15, if(Hours.NAOK <= 22, 20,if(Hours.NAOK <= 27, 25, if(Hours.NAOK <= 32, 30,if(Hours.NAOK <= 37, 35, if(Hours.NAOK <= 42, 40, if(Hours.NAOK <= 47, 45, if(Hours.NAOK <= 52, 50,if(Hours.NAOK <= 57, 55,60)))))))))}
Seeing this: Maybe you can use a formula instead of the multiple IFs.
Something like
{if(Hours.NAOK <= 17, 15, if(Hours.NAOK <=57, 5*floor((Hours.NAOK+2)/5),60))}
Not tested.
Joffm