You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
STACK evaluates all nouns when displaying multiple choice question (MCQ) options. My use case is specifically the noun 'diff, so I will concentrate on that.
When 'diff is part of a choice in a MCQ, it is evaluated before the tex to display the option is generated. This is a problem when you want to display things like 'diff(f,x) as options in an MCQ. Instead of displaying the derivative, it evaluates and displays 0. Specific to diff, declaring depends(f,x) makes no difference to the display of 'diff(f,x) or diff(f,x). The non-action of depends is probably a completely different issue (or intended behavior). I intend to concentrate on the noun issue.
This problem forces the use of diff(f(x),x) in MCQs, which would be nice to avoid as this does not typeset as neatly. Also you cannot have, for example 'diff(x^2,x) as an option in an MCQ. It would display as $2x$.
Minimal example
Question variables
depends(f, x);
disp1: 'diff(f,x);
disp2: diff(f,x);
MCQ: [
[disp1, true],
/* using the display option makes no difference */
[2, false, disp2]
];
Question text
These both (correctly) display as \(\frac{\mathrm{d}f}{\mathrm{d}x}\): {@disp1@}, {@disp2@}.
But the MCQ options are both displayed as 0.
[[input:ans1]] [[validation:ans1]]
Notes
Strangely, if we select the first option, at the PRT, ans1 is [diff(f,x)], not [0]. So it is to do with whatever happens when the tex is generated. The noun is still in there somewhere.
Use of noundiff makes no difference.
This behavior is similar for checkbox and radio questions.
The text was updated successfully, but these errors were encountered:
mrseanman
changed the title
Noun version of diff in multiple choice question is evaluated when displaying choices
Nouns appearing as options in multiple choice questions are evaluated when displaying MCQ choices
May 14, 2024
STACK evaluates all nouns when displaying multiple choice question (MCQ) options. My use case is specifically the noun
'diff
, so I will concentrate on that.When
'diff
is part of a choice in a MCQ, it is evaluated before the tex to display the option is generated. This is a problem when you want to display things like'diff(f,x)
as options in an MCQ. Instead of displaying the derivative, it evaluates and displays 0. Specific todiff
, declaringdepends(f,x)
makes no difference to the display of'diff(f,x)
ordiff(f,x)
. The non-action ofdepends
is probably a completely different issue (or intended behavior). I intend to concentrate on the noun issue.This problem forces the use of$2x$ .
diff(f(x),x)
in MCQs, which would be nice to avoid as this does not typeset as neatly. Also you cannot have, for example'diff(x^2,x)
as an option in an MCQ. It would display asMinimal example
Question variables
Question text
Notes
ans1
is[diff(f,x)]
, not[0]
. So it is to do with whatever happens when the tex is generated. The noun is still in there somewhere.noundiff
makes no difference.The text was updated successfully, but these errors were encountered: