Obviously this doesn't work for single questions, only multiple, arrays, etc.
single - single
single - multiple
multiple - multiple numerical
But there are these "old" scripts from tpartner
1. After the "source" question create a question of type "short text"
Put this into the "source" question"
Code:
<script type="text/javascript" charset="utf-8" data-author="Tony Partner">
$(document).on('ready pjax:scriptcomplete',function(){
//Identify the questions
var thisQuestion = $('#question{QID}');
var hiddenQuestion = $(thisQuestion).nextAll('.text-short:eq(0)');
// Create an array of answer codes
var answerCodes = ;
$('li.answer-item', thisQuestion).each(function(i) {
answerCodes.push($(this).attr('id').split('X{QID}')[1]);
});
// Load the hidden question
$('input:text', hiddenQuestion).val(answerCodes);
});
</script>
2. Depending on the type of the target question:
a. single, multiple
Code:
<script type="text/javascript" charset="utf-8" data-author="Tony Partner">
$(document).on('ready pjax:scriptcomplete',function(){
//Identify this question
var thisQuestion = $('#question{QID}');
var thisAnswerList = $('li.answer-item:eq(0)', thisQuestion).parent();
// Retrieve the answer codes from the "randomOrder" question
var answerCodes = '{RandOrder}'.split(',');
// Loop through the answer codes
$.each(answerCodes, function(i, val) {
// Move the answer item
$(thisAnswerList).append($('li.answer-item[id$="X{QID}'+val+'"]', thisQuestion));
});
});
</script>
b. array
Code:
<script type="text/javascript" data-author="Tony Partner">
$(document).on('ready pjax:scriptcomplete',function(){
//Identify this question
var thisQuestion = $('#question{QID}');
var thisAnswerList = $('tr.answers-list:eq(0)', thisQuestion).parent();
// Retrieve the answer codes from the "randomOrder" question
var answerCodes = '{RandOrder}'.split(',');
// Loop through the answer codes
$.each(answerCodes, function(i, val) {
// Move the answer item
$(thisAnswerList).append($('tr.answers-list[id$="X{QID}'+val+'"]', thisQuestion));
});
});
</script>
c. array(text)
Code:
<script type="text/javascript" data-author="Tony Partner">
$(document).on('ready pjax:scriptcomplete',function(){
//Identify this question
var thisQuestion = $('#question{QID}');
var thisAnswerList = $('tr.subquestion-list:eq(0)', thisQuestion).parent();
// Retrieve the answer codes from the "RandOrder" question
var answerCodes = '{RandOrder}'.split(',');
// Loop through the answer codes
$.each(answerCodes, function(i, val) {
// Move the answer item
$(thisAnswerList).append($('tr.subquestion-list[id$="X{QID}'+val+'"]', thisQuestion));
});
});
</script>