numbas/Numbas — Issue #111: answer restrictions - using variable values and length of variable values
Author: BillFoster
Created: 2012-01-19 09:42:49+00:00
State: open

It would greatly enhance string restrictions on answers if the values of variables could be used in the strings attributes in both musthave and notallowed properties of jme question types. Would this mean the conversion of the variable value to a string, perhaps done by the author? For example, it is often the case that in, for example, numeric answers, factorising numbers for example, you want to stop the input of the same number they are asked to factorize. It is more difficult in stopping the input of algebraic expressions, in for example, factorising a quadratic, as at present variables cannot take values with unknowns present.
Similarly with the length of an expected answer - this could be used to restrict the answers. This would mean a function giving the length of a number and allowing this variable to be included in the length attribute.