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
To complete the rewrite of all core parts, the parsing, interpretation and conversion of units must also be rewritten. The aim is to have consistent validation of student input (server-side) and make it easier for the users to define their own conversion rules and/or rulesets.
Some examples to illustrate the current limitations. Given a question with the answer 3600 s.
Other rules
Answer
Grading
min = 60 s; h = 60 min
60 min
wrong
(same)
1 h
wrong
(same)
3600000 ms
wrong
min = 60 s; 60 min = 1 h
1 h
correct
(same)
3600000 ms
wrong
3600 s = 60 min = 1 h
1 h
correct
3600 s = 60 min = 1 h
60 min
correct
h = 60 min; min = 60 s
60 min
correct
(same)
1 h
correct
The first three cases are graded wrong, because the current system checks whether there are any rules for the unit "min", which is not the case. Therefore, a new "dimension" (e. g. dimension number 16) is created for the unit "min" and a relation is created between "min" and "s" with "s" being shifted to dimension number 16. Afterwards, the system checks whether there is a rule for the unit "h", which is – again – not the case. Another new "dimension" (e. g. dimension number 17) is created for the unit "h" and relation is created between "h" and "min" with "min" (but not "s") being shifted to dimension number 17.
When the student enters "60 min", the system searches for a conversion rule for the unit "min". Once found, it reads the dimension (17) and compares that to the dimension of the model answer (16). As the dimension numbers are not the same, the system concludes that the two units are not compatible. The same happens, if the response is "1 h". For the response "3600000 ms", the answer's dimension is the original number (e. g. 1), so this unit has also become incompatible. Hence, all these answers are graded wrong.
The fifth case is wrong, because when parsing the rule min = 60 s, the new dimension (17) is propagated to the unit "s" whereas the unit "ms" is left at the original dimension (1), so "ms" has become incompatible to "s".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
To complete the rewrite of all core parts, the parsing, interpretation and conversion of units must also be rewritten. The aim is to have consistent validation of student input (server-side) and make it easier for the users to define their own conversion rules and/or rulesets.