mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 22:42:25 -04:00
fix answer buttons on review card
This commit is contained in:
parent
b415aa531e
commit
315838a56b
2 changed files with 6 additions and 4 deletions
|
@ -116,6 +116,9 @@ order by due""" % self._deckLimit(),
|
|||
|
||||
def answerButtons(self, card):
|
||||
if card.odue:
|
||||
# normal review in dyn deck?
|
||||
if card.odid and card.queue == 2:
|
||||
return 4
|
||||
conf = self._lapseConf(card)
|
||||
if len(conf['delays']) > 1:
|
||||
return 3
|
||||
|
|
|
@ -583,19 +583,18 @@ def test_cram():
|
|||
# make it due
|
||||
d.reset()
|
||||
assert d.sched.counts() == (0,0,0)
|
||||
c.due = 0
|
||||
c.due = -5
|
||||
c.ivl = 100
|
||||
c.flush()
|
||||
d.reset()
|
||||
assert d.sched.counts() == (0,0,1)
|
||||
# cram again
|
||||
did = d.decks.newDyn("Cram")
|
||||
# if cramRev is false, it's placed in the review queue instead
|
||||
# fixme: cards pulled from a deck with cramRev=True remain in that state
|
||||
d.decks.get(did)['cramRev'] = False
|
||||
d.sched.rebuildDyn(did)
|
||||
d.reset()
|
||||
assert d.sched.counts() == (0,0,1)
|
||||
c.load()
|
||||
assert d.sched.answerButtons(c) == 4
|
||||
# add a sibling so we can test minSpace, etc
|
||||
c2 = copy.deepcopy(c)
|
||||
c2.id = 123
|
||||
|
|
Loading…
Reference in a new issue