Randomization
Once you have completed the main steps, you will need to modify the parameters in the provided template snippet to apply the changes.
question_code
The code of the multiple choice question you want to configure
multiple_choice({
question_code: "Q1"
});
schema
This variable represents an open text field where answer codes will be stored. It is only required if you plan to use this question to filter or randomize in the same order. Remove it if not needed.
π‘ Use a descriptive name for the schema that indicates it is associated with a specific question code, such as
Q1_SCHEMA
or Q1xSCHEMA
βΉοΈ The open text should be placed in the same page of the multiple choice.
multiple_choice({
question_code: "Q1",
schema: "Q1xSCHEMA"
});
randomize
Here we define settings for randomization. If not needed, just remove this entire block code and skip this tutorial π
multiple_choice({
question_code: "Q1",
schema: "Q1xSCHEMA",
randomize: {
}
});
randomize
-> filter_schema
This variable allows you to randomize answer options in the same order as a previous question by using its schema.
βΉοΈ If you choose to use this feature, you can skip the rest of the configurations described below this row.
multiple_choice({
question_code: "Q1",
schema: "Q1xSCHEMA",
randomize: {
filter_schema: "Q0xSCHEMA",
}
});
randomize
-> answer_groups
This variable represents a list of answer codes that you want to group together for randomization. The answer codes should be wrapped inside brackets [] and separated by commas.
βΉοΈ Any remaining answer codes that are not included in a group will be treated as anchors.
/* Using one group */
multiple_choice({
question_code: "Q1",
schema: "Q1xSCHEMA",
randomize: {
answer_groups: [
[1, 2]
]
}
});
/* Using multiple groups */
multiple_choice({
question_code: "Q1",
schema: "Q1xSCHEMA",
randomize: {
answer_groups: [
[1, 2], // group 1
[3, 4] // group 2
]
}
});
randomize
-> randomize_groups
This variable determines whether or not answer groups should be randomized after the elements inside them have been randomized.
If set to true, both the elements within the groups and the groups themselves will be randomized.
If set to false, only the elements within the groups will be randomized.
multiple_choice({
question_code: "Q1",
schema: "Q1xSCHEMA",
randomize: {
answer_groups: [[1, 2]],
randomize_groups: false
}
});
Last updated
Was this helpful?