Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Warn students before submitting of pattern match result #1099

Closed
Spruce8913 opened this issue May 4, 2024 · 6 comments
Closed

Comments

@Spruce8913
Copy link

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?

@christianp
Copy link
Member

It would be nice to have more control over warnings. The marking algorithm system at the moment doesn't really let you do anything before the student submits their answer, so the warnings you get at the moment are all built in.

Pattern matching can be quite slow, so I'd like to do some testing before making it happen on every keypress.

@christianp
Copy link
Member

@Spruce8913 is this the kind of thing you imagined? The warning is "Your answer is not in the right form:" followed by the pattern restriction warning message given by the question author.

Screencast.from.09-05-24.14.10.54.webm

@Spruce8913
Copy link
Author

This is exactly what I'm looking for!

@christianp
Copy link
Member

christianp commented May 10, 2024

Does this set of options, and label for the setting, make sense?

When to warn the student if their answer does not match the pattern

If On submission is selected, the student will only be told that their answer does not match the pattern after they submit their answer.

If On input, and prevent submission is selected, the student will be shown a warning next to the input box as soon as they enter an expression which does not match the pattern. If they try to submit the answer, it will be marked as invalid.

christianp added a commit that referenced this issue May 10, 2024
see #1099

We're still debating if there are only two options needed here,
corresponding to
* warn on input, prevent submission
* warn on submission, apply partial credit
or if we need either of these two other options:
* warn on submission, prevent submission (why not warn earlier?)
* warn on input, apply partial credit (all other on-input warnings
  prevent submission)
christianp added a commit to numbas/editor that referenced this issue May 10, 2024
@Spruce8913
Copy link
Author

If you ask me, I would also allow the option "warn on input, apply partial credit (all other on-input warnings prevent submission)" that I saw in your content. Teachers may want to warn students about a mistake, but still allow them to make the mistake, to discuss it afterwards in person.

I personally would also rephrase the documentation a bit. "On submission" and "On input, and prevent submission" is for not-too-technical readers not superclear. I would use "After submitting", "While typing their answer", ...

christianp added a commit to numbas/editor that referenced this issue May 21, 2024
@christianp
Copy link
Member

christianp commented May 21, 2024

@Spruce8913 thanks for that suggestion. The options are now "After submitting", "While entering their answer", and "Prevent submission".

There's documentation at https://docs.numbas.org.uk/en/latest/question/parts/mathematical-expression.html#term-When-to-warn-the-student-if-their-answer-does-not-match-the-pattern

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants