-
Notifications
You must be signed in to change notification settings - Fork 521
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
Sometimes fraction input doesn't let you submit #425
Comments
@BenHenning Could you please suggest a scenario. |
Ah, Sean and I noticed that a few times when you try submitting a fraction the submit button doesn't do anything, and you stay stuck on the state. I noticed this last week, but I haven't yet consistently reproed it to fix it. I was going to investigate--do you have any ideas what might be causing it? |
On the card in the second Fractions lesson where it showed a 3/4 circle (red-shaded, with different sized pieces), I typed 3/2 to start with, got "this is wrong", and then typed some other fraction. It started hanging at that point, no matter what fraction I typed. |
FWIW I believe you need to fully exit the exploration and re-enter to remediate. |
Just caught this for one scenario: I tried entering '2' and it failed:
It didn't end up permanently broken, though, so I'm not sure this is the same problem. I'm also confused why the InteractionObject type is being mixed up...it should always be a fraction. |
Aha! I then put in a wrong fraction and it parsed, but now every input after appears broken. Investigating why it's permanently borked. |
I'm getting closer on why it's failing, but I have no clue why it permanently breaks. |
Ah, I think it's because certain answers trigger a bad rule to be evaluated. I suspect if I put the right answer in it may fix itself. I'm not sure why it didn't fix for you, @seanlip. Will check to see if that remediates momentarily. |
Okay, we're hitting a HasDenominatorEqualTo and the x value being provided is a double, but it's supposed to be an int per https://github.com/oppia/oppia/blob/11c73a781ecdc221947fcac5bd5838909d14bdf7/extensions/interactions/rule_templates.json#L61 which is also what the classifier is expecting, so it's throwing an exception and failing. |
Assuming this is a parsing issue, but not sure yet. |
Confirming submitting the correct answer seems to fix the state. Not sure what we hit earlier Sean, but I'm pretty sure this is the same issue. |
Hmm
|
FYI I never submitted the correct answer earlier.
|
@vinitamurthi do you have some context on why we're setting real here instead of non-negative int? |
Thanks Sean. We should test these cross scenarios more thoroughly. Filed #449 to track. |
Fix is forthcoming. |
Agreed this is serious, we should be able to respond gracefully to all possible inputs. Should we put #449 on a priority list? |
Yep, it's essential. I think we're incorrectly parsing other interaction inputs as well, we just probably don't run into those. JSON is not the best way to be doing this, so we have a lot of work to do around improving our data typing throughout the retrieval pipeline to make these sorts of issues much harder to hit, plus reach 100% behavioral test coverage so that we detect when it does happen. |
A numerator can be a negative int as well right? That's why it was set as real, otherwise we could have a negative int as well |
My comment got deleted - The JSON solution is only temporary for these 6 explorations right? If so, the only rule specs I came across that were different from the original input were HasNumeratorEqualTo and HasDenominatorEqualTo. |
…d of double (#450) * Update fraction rule parsing to use non-negative int instead of double. * Address reviewer comment.
The fix from #450 seems to sometimes not work. I need to investigate further. |
No description provided.
The text was updated successfully, but these errors were encountered: