-
Notifications
You must be signed in to change notification settings - Fork 526
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
Fraction type JSONObject Parsing Error #4202
Comments
Adding a check in private fun createExactInputForFractionInput(
inputJson: JSONObject,
keyName: String,
ruleType: String
): InteractionObject {
return when (ruleType) {
"HasNumeratorEqualTo" ->
InteractionObject.newBuilder()
.setSignedInt(inputJson.getInt(keyName))
.build()
"HasDenominatorEqualTo" ->
InteractionObject.newBuilder()
.setNonNegativeInt(inputJson.getInt(keyName))
.build()
+ "HasIntegerPartEqualTo" ->
+ InteractionObject.newBuilder()
+ .setSignedInt(inputJson.getInt(keyName))
+ .build()
else ->
InteractionObject.newBuilder()
.setFraction(parseFraction(inputJson.getJSONObject(keyName)))
.build()
}
} |
This seems reasonable to add, though FWIW this won't affect alpha since we don't use the JSON loader for those lessons. De-assigning and marking as a good first issue for someone to pick up. |
Interested! |
@adizcode Assigned. |
I'm unable to find any Chapter 6 within the app. There's only 4 topics and none of them have the mentioned chapter. What am I missing? |
@adizcode Chapter 6 mentioned in the issue is a part of the alpha production app so the data can't be shared. |
@anandwana001 hey can you elaborate more on Steps to reproduce the behaviour issue because I couldn't find where this error is ?? |
Did you follow the given steps? |
@anandwana001 I found the file where we have to make the changes but I couldn't find any option to open chapter 6 to get the error |
No, As I mentioned, chapter 6 is a part of alpha data that is not available publically, that's why we need to fix this issue using the currently available data only. Check 5th Step, you have to use the |
Please assign this issue to me . |
Could you please assign this to me ? |
Please make sure to fill the CLA before you start contributing @AbhaySota |
I have filled the CLA form @JishnuGoyal . |
Assigning you this issue @AbhaySota |
Hey @JishnuGoyal @ayush0402 I saw the PR of this issue was marked stale, If its alright can I work on this issue? |
@BenHenning, |
Hey @adhiamboperes @anandwana001 @JishnuGoyal @ayush0402 , |
@TanishMoral11, this lesson exists in the Playstore vesrion. You can try to reproduce it using the repro steps mentioned in the main issue body. |
Hey @adhiamboperes , I Want To Work On This Issue . Additionally, I have a quick question regarding Chapter 6 (Playstore Version). Since this issue is in Chapter 6, do I need to complete all five chapters on my own, or is there any way to focus directly on the specific chapter causing the issue? Thanks !! |
@TanishMoral11, for the playstore version, you actually need to play through the lessons, because the chapters being locked is a feature. The developer version of the app has means to bypass this however. |
Hey @adhiamboperes , Can I Work On It ? |
Describe the bug
Fraction's rule type
HasIntegerPartEqualTo
is not parsing correctly.To Reproduce
Steps to reproduce the behavior:
Expected behavior
The data should be parsed correctly.
Demonstration
Environment
Additional context
Error Log
Data
To Fix
oppia-android/domain/src/main/assets/test_exp_id_2.json
oppia-android/domain/src/main/assets/test_exp_id_2.json
Line 407 in 88f25ec
it will look like this after adding
The text was updated successfully, but these errors were encountered: