Adaptive Testing - Section wise Randomization

The example demonstrates to deliver a test that pick fixed no of question from each section. Different set of questions would be delivered to different candidate from the entire set of questions available as part of the test.

Set up the Test

  • Create a test with enough number of questions in it (as an example lets create a test with 15 questions)
  • Enable adaptive property of the test, and save it once
  • Test has three section - Section A contains Q1 to Q5, section B Q6 to Q10 , Section C Q11 to Q15.

  • Enter the rule as shown below, and associate it with all questions in the test, 1-15. Refer to the list of Rule Variables for more details about all the available variables which can be used as part of the rule script.

 Rule Script :

// SCB - first question seq no in section
var sB = parseInt(SCB);
// SCB - last question seq no in section
var sE = parseInt(SCE);
var tAtt = parseInt(TATTS);
// SMQ - Max no of question that would be attempted in section
var smax = parseInt(SMQ);

if(tAtt < smax ){
        var nq = parseInt(NRQCSS)+"";
        return nq;

//go to next section
var sSQ = sE + 1 ;  var sEQ = 0;
// section B starts
if ( sSQ == 6) {     sEQ = 10; }
// Section C starts
if (sSQ == 11)  {   sEQ = 15; }

// generate a random no between sSQ and sEQ
var rand_no = Math.floor((sEQ-(sSQ - 1))*Math.random()) + sSQ;
nq = parseInt(rand_no)+""

print ("Next question = "+nq+"\n");
return nq;

  • Enter MAX_Q and MAX_P custom properties, so users would see that they have to take 5 questions only and % score would be based on max score of 5 instead what is setup in test's properties

  • Publish the test and test to check if you get it to run as expected (picks 2 Question from Section A, B and 1 Question from Section C).