Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #4202: Add support for parsing HasIntegerPartEqualTo rule type. #5610

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
9 changes: 8 additions & 1 deletion domain/src/main/assets/test_exp_id_2.json
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,14 @@
"denominator": 2
}
}
}],
},
{
"rule_type": "HasIntegerPartEqualTo",
"inputs": {
"x": 1
}
}
],
"outcome": {
"dest": "MultipleChoice",
"feedback": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,10 @@ class StateRetriever @Inject constructor() {
InteractionObject.newBuilder()
.setNonNegativeInt(inputJson.getInt(keyName))
.build()
"HasIntegerPartEqualTo" ->
InteractionObject.newBuilder()
.setSignedInt(inputJson.getInt(keyName))
.build()
else ->
InteractionObject.newBuilder()
.setFraction(parseFraction(inputJson.getJSONObject(keyName)))
Expand Down
Loading