Please try adding this script to your second ranking question:
<script>
$(document).ready(function(){
[% Begin Unverified Perl
# Params
my $firstRanking = 'RankingQ1';
my $items = 10;
# Run
my @ranks = ();
for (my $i = 1; $i <= $items; $i++) {
my $rank = GETVALUE($firstRanking . '_' . $i);
push (@ranks, $rank);
}
return 'var ranks = [' . join(',', @ranks) . ']; var items = ' . $items . ';';
End Unverified %]
var answered = false;
for (var i = 1; i <= items && !answered; i++) {
answered = SSI_GetValue('[% QuestionName() %]_' + i);
}
if (!answered) {
for (var i = 1; i <= items; i++) {
$('#[% QuestionName() %]_' + i).val(ranks[i - 1]);
}
}
})
</script>
Line 5 should be updated with the name of the first ranking question. Line 6 should be updated with the number of items that are involved in these questions.