Multiple Choice Questions - mkraska/meclib GitHub Wiki
This page shows the steps to create an MC input. Based on the official STACK documentation on MC input. Nothing below is specific to Meclib. Yet it might be helpful.
Input, PRT and General feedback are different for single correct choices and multiple correct choices.
Question variables
XX_mcq
is the definition of the options, which of them is correct and how to display them. This goes to the model solution field of the mcq input field. The first entry in each option is the so called value. It should match the position of the entry in the list. For multiple correct choices you should add an entry "none of the other" to distinguish non-answered questions from deliberate response that none is correct.
XX
is the base name of the input.
XX_mcq: [
[1, true, "display"],
[2, false, "display2" ],
[3, false, "display3" ]
];
Question text
As usual, a set of input, validation and feedback is allocated:
Select the correct answer: [input:S_XX](/mkraska/meclib/wiki/input:S_XX) [validation:S_XX](/mkraska/meclib/wiki/validation:S_XX), [feedback:XX](/mkraska/meclib/wiki/feedback:XX)
S_XX
Input There are three options for MC input:
- Drop down list (only single correct choices)
- Radio buttons (only single correct choices)
- Checkbox (list) Use this if there could be more than one correct choice.
Option | value |
---|---|
Input type | Checkbox or Drop down list or Radio |
Model solution | XX_mcq |
Student must validate | No |
Show validation | No |
XX
Potential response tree PRT for single correct choice
Option | value |
---|---|
Feedback variables | |
PRT feedback style | compact |
Answer test | AlgEquiv |
SAns | S_XX |
TAns | mcq_correct(XX_mcq)[1] |
PRT for multiple correct choices
Option | value |
---|---|
Feedback variables | OK: is(length(sublist(fb_mcq, lambda([x], x[2] # member(x[1], S_fb))))=0); |
PRT feedback style | compact |
Answer test | AlgEquiv |
SAns | OK |
TAns | true |
General feedback
The list of correct choices can be displayed using
{@mcq_correct(XX_mcq)[3][1]@} /* single correct choice */
{@stack_disp_comma_separate(makelist(XX_mcq[x][3], x, XX))@} /* multiple correct choices */