You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It was reported that an equality problem where the student was asked to write the equality for mg to g was not operating correctly.
If you put (below), it would grade it as correct. 1mg = 0.0001g
If you put (below), it would grade as incorrect 1g = 10000mg
I finally traced it to a new PG file (DigitsTolType.pg) that set the default 'tolType' to a new type called 'digital' and the actual 'tolerance' flag was set to '0.001'.
This means the InexactValue macro was assuming 'absolute' tolType (logic says not 'relative', so much be 'absolute'). Equalities are graded by dividing the two numbers and comparing to the correct ratio.
0.0001/1 = 0.0001 is within the tolerance of the correct answer: 0.001 +- 0.001
This new PG file is not to blame though. It just made my bug apparent. InexactValue has default tolerance = 0 and tolType set as relative. InexactValueWithUnits does not. I forgot it doesn't actually use InexactValue as a base class. I had to add the tolType and tolerance defaults to InexactValueWithUnits so this does not happen again.
The text was updated successfully, but these errors were encountered:
It was reported that an equality problem where the student was asked to write the equality for mg to g was not operating correctly.
If you put (below), it would grade it as correct.
1mg = 0.0001g
If you put (below), it would grade as incorrect
1g = 10000mg
I finally traced it to a new PG file (
DigitsTolType.pg
) that set the default 'tolType' to a new type called 'digital' and the actual 'tolerance' flag was set to '0.001'.This means the InexactValue macro was assuming 'absolute' tolType (logic says not 'relative', so much be 'absolute'). Equalities are graded by dividing the two numbers and comparing to the correct ratio.
0.0001/1 = 0.0001 is within the tolerance of the correct answer: 0.001 +- 0.001
This new PG file is not to blame though. It just made my bug apparent. InexactValue has default tolerance = 0 and tolType set as relative. InexactValueWithUnits does not. I forgot it doesn't actually use InexactValue as a base class. I had to add the tolType and tolerance defaults to InexactValueWithUnits so this does not happen again.
The text was updated successfully, but these errors were encountered: