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

Graph not displaying correct number of learned cards #30

Open
DrSchwifty opened this issue Jan 14, 2021 · 2 comments
Open

Graph not displaying correct number of learned cards #30

DrSchwifty opened this issue Jan 14, 2021 · 2 comments

Comments

@DrSchwifty
Copy link

I love this add-on and have been using it for a while now, but recently I've noticed on Anki 2.1.26 the graph isn't showing the correct number of cards learned. For instance if I have 1,000 unsuspended cards in a deck and limit it to learning 100 cards per day and I do those 100 cards the graph only displays that I've done ~75 cards. I think its not counting the cards that I hit easy on the first time I see the card, but I'm not sure.

@matthayes
Copy link
Owner

Sorry I forgot to respond to this.

I think its not counting the cards that I hit easy on the first time I see the card, but I'm not sure.

This is a useful observation. I wonder if there is a bug here. I'm going to do some testing and will get back to you.

@matthayes
Copy link
Owner

I reviewed the code and did some testing. I looked at some cards in the data where I had hit easy on the first time seeing it. There could still be an issue, but the logic in the code seems correct to me based on what I'm observing in the data. Maybe there is some difference with the review history in Anki 2.1.26. When you learn the 100 cards, are you completing all the learning steps for the cards as well? If the card is not considered learned until it completes all the learning steps. If you're willing to share your deck with me I could check the review history to see if there is an issue.

In case you're curious about what I was looking into, there is a piece of code (below) that checks whether one of the reviews in the queried reviews for a card is the first time it was learned. I confirmed for my data that when if I hit easy on the first time seeing a card the new interval is positive and the last interval is negative.

    for review in card_reviews.reviews:
        if review.lastIvl < 0 and review.ivl > 0 and review.id == review.first_learned_id:
            return True

    return False

https://github.com/matthayes/anki_progress_stats/blob/master/progress_stats/compute.py#L196

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

No branches or pull requests

2 participants