Fix another regression caused by #609.#645
Conversation
If a problem sets the answer to be a formula with an assigment,
(something like `Formula("x = 5")` then all answers are counted
incorrect and a warning is displayed that the evaluated answer is not an
answer hash. This worked prior to openwebwork#609. The cause of this was the
removal of a line that should not have been removed that converts the
other answer being compared to to a Formula if it is not already.
Note that the original issue that was attempted to be fixed by openwebwork#609
still is fixed with this change.
This fixes issue openwebwork#644 that I just submitted about this.
|
I can confirm this fix works. I just ran across a very similar issue where if the answer was |
|
@somiaj: I can confirm the behavior you describe with the ParserAssignmentMWE.pg problem that I attached above. If you enter |
pstaabp
left a comment
There was a problem hiding this comment.
Having trouble getting my main branch running well, but the develop branch looks good and noticed that this does restore the line that was deleted.
If a problem sets the answer to be a formula with an assigment, (something like
Formula("x = 5")then all answers are countedincorrect and a warning is displayed that the evaluated answer is not an answer hash. This worked prior to #609. The cause of this was the removal of a line that should not have been removed that converts the other answer being compared to to a Formula if it is not already.
Note that the original issue that was attempted to be fixed by #609 still is fixed with this change.
This fixes issue #644 that I just submitted about this.
Attached are minimal working examples for the original issue as well as for this one.
FormulaAssignment.pg.txt
ParserAssignmentMWE.pg.txt
See issue #607 for details on how to test ParserAssignmentMWE.pg, and issue #644 for details on testing FormulaAssignment.pg.
Note that this is definitely a hotfix. This certainly brings in to question that #609 should have been a hotfix, considering that this is something that has been this way since 2008.