numbas / editor

An editor for the Numbas e-learning system.
http://numbas.mathcentre.ac.uk
Apache License 2.0
59 stars 61 forks source link

Don't look for variable references in function definitions written in javascript #781

Closed christianp closed 1 year ago

christianp commented 1 year ago

I don't think this is exactly the problem - I made a new question with a function defined in JS, and it didn't pick up the reference. I think it's failing to clear the reference if you change the language of a function from JME to JS after evaluating it.

christianp commented 1 year ago

That fix was wrong: functions defined in JS should use the default findvars behaviour, to find variables used in their arguments, instead of always returning the empty list.