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

Answers corrected with double-check still counts as incorrect #66

Open
gunt3001 opened this issue Aug 5, 2024 · 0 comments · May be fixed by #68
Open

Answers corrected with double-check still counts as incorrect #66

gunt3001 opened this issue Aug 5, 2024 · 0 comments · May be fixed by #68

Comments

@gunt3001
Copy link

gunt3001 commented Aug 5, 2024

Description

While messing around with the logic for double-check, I noticed something odd about double-check behavior.

When an answer was initially answered incorrectly, but is corrected using double-check, Hebikani submits an incorrect answer count to Wanikani API.

I'm wondering if this is intended behavior? My gut feeling is that it probably shouldn't because the user explicitly wants to mark the question as correct.


To go specific into the code, the logic to count wrong answer in Question.solve() was run before the double-check logic in process_answer()

hebikani/hebikani/hebikani.py

Lines 1067 to 1068 in 82ee548

if _answer == AnswerType.INCORRECT:
self.wrong_answer_count += 1

hebikani/hebikani/hebikani.py

Lines 1353 to 1355 in 82ee548

print("Question was changed to correct")
self.nb_correct_answers += 1
question.solved = True

Steps to Reproduce the Problem

  1. Start Hebikani review with --double-check flag
  2. Answer a meaning question incorrectly
  3. Answer y when prompted My answer was correct [y/N]
  4. Answer the reading question
  5. Observe incorrect_meaning_answers: 1 submitted to Wanikani API

Specifications

  • Version: 82ee548 (1.8.1)
  • Platform: Python 3.10.12, pip 22.0.2
  • OS: Ubuntu 22.04.1 LTS
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 a pull request may close this issue.

1 participant