Numbas icon indicating copy to clipboard operation
Numbas copied to clipboard

Feature Request: Warn students before submitting of pattern match result

Open Spruce8913 opened this issue 9 months ago • 5 comments

We have students answering an equation, representing a real-life constraint in word-problems to practice formalizing stories in mathematics. For example: " you have a budget of {budget} euros that you will spend entirely. You will spend your budget on candy and videogames. If you spend x euros on candy and y euros on videogames, what equation represents the budget constraint?

Answer: x+y={budget} "

We frequently have students answering only the 'interesting' part of the equation, so just x+y, which is marked incorrect. Is there a way to warn students in advance, if they have not used an '=' symbol? This is similar to the functionality of warning about unexpected variable names (see issue here). I have tried to achieve this by adding m_anywhere("=") in the Restrictions tab for what pattern the student's answer must match, but this is only checked after submitting.

More generally speaking, would it be possible to do pattern matching as the student types and warn in advance? If this is too tricky, is there some other way to dynamically warn students about having to enter the full equation?

Spruce8913 avatar May 04 '24 10:05 Spruce8913