BSCrumpton / Deadline2

An update of the Anki Deadline addon with GUI configuration.
GNU General Public License v3.0
8 stars 2 forks source link

Not showing all decks #4

Closed Max604 closed 4 years ago

Max604 commented 4 years ago

Please see attached image - its not showing all of the decks that I have made and therefore I can't select the date I would like.

image

BSCrumpton commented 4 years ago

hey @Max604 , does the deck you're trying to add a deadline for have cards in it? currently, "Hierarchical" decks without cards in them are not displayed in the deadline add screen.

Max604 commented 4 years ago

Yes I have deck called MMED1005 (non-hierarchial) with many cards in but there isn't a way for me scroll down that list or something. However some other sub decks might have none, is that causing it to stuff up?

Sent via Superhuman iOS https://sprh.mn/?vip=max604contact@gmail.com

On Wed, May 27 2020 at 11:20 pm, BSCrumpton notifications@github.com wrote:

hey @Max604 https://github.com/Max604 , does the deck you're trying to add a deadline for have cards in it? currently, "Hierarchical" decks without cards in them are not displayed in the deadline add screen.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/BSCrumpton/Deadline2/issues/4#issuecomment-634674418, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABRNSIXSRDJB4LNXLGCNW23RTULA7ANCNFSM4NJ5MP6A .

BSCrumpton commented 4 years ago

@Max604 something seems up then. Would you be able to post a screenshot of your deck list outside of the deadline addon? especially any that aren't showing up.

I haven't yet seen any issues of folks not being able to scroll, so I don't think that's an issue. More likely, your deck (MMED1005 for example) isn't being added to the list for some reason.

Max604 commented 4 years ago

Here it is and yeah I have too many sub decks but that's for a deck I've now archived and don't use.

image

image

BSCrumpton commented 4 years ago

ah, figured out the issue.

        for deck in sorted(aqt.mw.col.decks.allNames()):
            deckId=mw.col.decks.byName(deck)['id']
            new_cards = mw.col.db.scalar("""select count() from cards where type = 0 and queue != -1 and did = ?""", deckId)
            if(new_cards<1):
                continue
            self.deckBox.addItem(deck)

This is where I pull in all of the decks to add to the dropdown. It requires you to still have cards that you haven't learned yet (still have something in the "new" column). as an example here- if you add a new card to the MMED1005 deck then instantly go to the deadline addon, i'd expect you can add a deadline to that deck. Would you mind trying this, @Max604

I need to think on if this should be the intended behavior. If not- what should the behavior be?

Max604 commented 4 years ago

ah, figured out the issue.

        for deck in sorted(aqt.mw.col.decks.allNames()):
            deckId=mw.col.decks.byName(deck)['id']
            new_cards = mw.col.db.scalar("""select count() from cards where type = 0 and queue != -1 and did = ?""", deckId)
            if(new_cards<1):
                continue
            self.deckBox.addItem(deck)

This is where I pull in all of the decks to add to the dropdown. It requires you to still have cards that you haven't learned yet (still have something in the "new" column). as an example here- if you add a new card to the MMED1005 deck then instantly go to the deadline addon, i'd expect you can add a deadline to that deck. Would you mind trying this, @Max604

I need to think on if this should be the intended behavior. If not- what should the behavior be?

ah that was it! Good job :)

That was tricky to find though and I assume there may be some other non-tech people on GitHub who might run into this issue.

I'm not sure what the intended behaviour should be but it might good to explain why your deck might not show in the list.

I was also wondering, my ideal idea in a deadline plugin would be to ensure I've covered each card at least x times. You've mentioned that it's just to cover all new cards at least once, which won't always ensure you've adequately covered each cards, on average, enough times to commit it well to memory.

What do you think?

Thanks

jsands214 commented 4 years ago

Have you considered using the rememorize addon? Either that, or setting your deadline ahead of when you want to have learned your cards? I don't know if @BSCrumpton can make the addon write so that you see a card X times before a deadline since the number of times you see a card is completely dependent on how you rate the card during reviews and how you have your ease settings.

BSCrumpton commented 4 years ago

going to go ahead and close this issue- Looks like (for now at least), this was intended behaviour, and there are other addons that potentially cover the want you have.