Mazi,
Thank you very much for pointing me in the right direction.
Even though my jQuery and JavaScript capabilities are really limited I have managed to modify the workarounds to achieve what I have been looking for.
For future reference I would integrate my solution into the wiki. However I believe the jQuery insertion I have chosen is rather specific and would not work if the advanced settings of the question would not contain an "equal_sum", as I had to insert the answer right before the "li.multiplenumerichelp" (see below) which I believe only appears in this specific case.
Does any of you with more jQuery/DOM experience have an idea how to generalize?
Anyway, thank you very much for the help - my current problem has been solved!
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
// Function to allow randomization of all answers except the last one in multiple numeric input questions
function partRand(sID, gID, qID) {
// Find the number of answers
var ansCount = ''
$( 'div#question' + qID + ' div.answers li' ).each(function(i) {
ansCount = (i - 1);
});
// Place the last answer created at the end of the list - but before the first helping sum
$( 'li#javatbd' + sID + 'X' + gID + 'X' + qID + ansCount + '' ).insertBefore($( 'div#question' + qID + ' div.answers li.multiplenumerichelp' ).first());
}
// Call the function with the SID, GID and QID
partRand(SID, GID, QID);
});