numbas / Numbas

A completely browser-based e-assessment/e-learning system, with an emphasis on mathematics
http://www.numbas.org.uk
Apache License 2.0
197 stars 118 forks source link

Invalid input warnings for a custom part type disappear when you submit #1033

Closed christianp closed 10 months ago

christianp commented 10 months ago

The answer widgets for custom part types can produce warnings, which are applied by the CustomPartTypeDisplay. When you submit the part, the existing warnings are cleared. The part has no staged answer because it's invalid, so only the warning "no answer submitted" is shown, which isn't correct: an invalid answer was submitted.

For the built-in part types, the marking algorithm does its own validity checks and produces warnings. But we never get as far as running the marking algorithm for a CPT with an answer that is invalid for the input widget.

Is it acceptable for CPTs to have custom "submitted with no staged answer" logic, to show these warnings?