As far as I know, there is no way to do that with Expression Manager, however, you could use JavaScript to load a hidden short-text question with a sorted array of the question codes. This hidden question would need to be placed in a group following that of Q1-Q5.
You can then insert the value of the hidden question into the admin email.
Since there is no sorting of associative arrays in JavaScript, we will need to build an array of arrays containing the answer:qCode pairs and sort that. Then we can loop through the sorted array, building a new array of the qCodes. That array can be written into the question input.
Insert this script into the source of the short-text question:
Code:
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
// Uncomment the line below to hide the question
// $('#question{QID}').hide();
// Build an associative array of the answers
var answers = {
Q1:{Q1},
Q2:{Q2},
Q3:{Q3},
Q4:{Q4},
Q5:{Q5}
}
// Build an array of arrays with the qCode:answer pairs
var sortedAnswers = [];
for(var question in answers) {
sortedAnswers.push([question, answers[question]]);
}
// Sort that array of arrays descending
sortedAnswers.sort(
function(a, b) {
return b[1] - a[1]
}
);
// Build an array of the sorted qCodes
var sortedQuestions = [];
$(sortedAnswers).each(function(i) {
sortedQuestions.push(this[0]);
});
// Load the sorted qCodes into the question input
$('#question{QID} input.text').val(sortedQuestions);
});
</script>
Sample survey attached: