Skip to content

Commit

Permalink
Add support for parsing HasIntegerPartEqualTo rule type.
Browse files Browse the repository at this point in the history
  • Loading branch information
TanishMoral11 committed Dec 20, 2024
1 parent 05d01a4 commit 685e1dd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
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

0 comments on commit 685e1dd

Please sign in to comment.