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: mark answer in ReviewSession.process_answer instead of Question.solve #68

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

TommyAmberson
Copy link

The logic for marking whether a question was correct or incorrect was split between ReviewSession.process_answer and Question.solve. If it was Correct or Incorrect, the question was mutated in solve but otherwise it was resolved in process_answer. This was causing a problem with the double_check feature. Because even if the result was changed in process_answer since it was already marked incorrect in 'solve' it was submitted to wanikani as incorrect.


The first commit adds tests for double check. They fail on master (#66).

The second commit moves the CORRECT and INCORRECT handling into process_answer. This way, the INCORRECT is handled almost the same way as A_BIT_OFF.

This did break the test test_card_is_solved since now the card is only marked solved after process_answer. Adding a session and processing each answer made that test match the new way of marking answers.

fixes #66

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Answers corrected with double-check still counts as incorrect
1 participant