Closed jolyonb closed 5 years ago
Sure. I think the way to do this would be to expand comparer_function
to be like a normal customrespnse check function, returning either a boolean or a dict {'ok': ..., 'msg': ..., 'grade_decimal': ...}
.
Hmm. I'll need to think on this one. I want to keep the comparer_function
implementation as simple as possible, as it's intended for other people to be able to write these straightforwardly.
Re comment in #94:
I think these last few changes have made implementing #74 much easier now, too. Yes, I think this would be easier now that comparer_function can return either True/False/'partial' or a dictionary with message and partial credit.
I think the biggest impediment is that currently FormulaGrader stops evaluating as soon as the first comparison fails (well, really, when n_failures
exceeds n_failable_evals
).
This would also really only be useful for matrix-entry problems. (Entering [1, 2, 3]
, etc) as opposed to problems where we only want matrices for non-commutative symbols.
Remember that the comparison function compares the entire matrix at once.
Also, agreed, this is only relevant for matrix-entry problems. If you're just manipulating expressions with array-like variables, this isn't a useful feature.
Resolved by #255
We should be able to check how many entries in a tensor expression are correct or not, and assign credit appropriately. At least, it should be an option. Another option that could be enabled is a message that returns which entries are incorrect.