maths / moodle-qtype_stack

Stack question type for Moodle
GNU General Public License v3.0
142 stars 149 forks source link

Allow student input like inverse_erf(x) #1292

Closed sangwinc closed 3 weeks ago

sangwinc commented 3 weeks ago

Currently the input inverse_erf(x) is rejected as "invalid" for student input.

This is a result of the 402 filter applied here. https://github.com/maths/moodle-qtype_stack/blob/master/stack/input/inputbase.class.php#L955

To allow this input we need an option to disable this filter for a particular input (and users will also need to add inverse_erf(x) to the allowed words for the input).

This is a very useful filter, and needs to be there by default. It could be considered a little over-zealous for more advanced users.

aharjula commented 3 weeks ago

One might want to think if 402 should, in addition to the static security-map identifiers, leave the allowed words alone. The filter does have access to those through the cas_security object.

sangwinc commented 3 weeks ago

Thanks @aharjula that's a very helpful suggestion, and means we need no further options.