mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 01:06:35 -04:00
use scheduled ivl in lapse calculation
reverting to 2.0 behaviour https://anki.tenderapp.com/discussions/effective-learning/1300-lapse-duration-not-being-honored-for-lapses-of-multi-stepday-relearn-cards
This commit is contained in:
parent
eb44584b29
commit
a728595c1d
2 changed files with 2 additions and 7 deletions
|
@ -856,10 +856,7 @@ select id from cards where did in %s and queue = 2 and due <= ? limit ?)"""
|
||||||
return delay
|
return delay
|
||||||
|
|
||||||
def _lapseIvl(self, card, conf):
|
def _lapseIvl(self, card, conf):
|
||||||
due = card.odue or card.due
|
ivl = max(1, conf['minInt'], card.ivl*conf['mult'])
|
||||||
elapsed = card.ivl - (due - self.today)
|
|
||||||
ivl = min(elapsed, card.ivl)
|
|
||||||
ivl = max(1, conf['minInt'], ivl*conf['mult'])
|
|
||||||
return ivl
|
return ivl
|
||||||
|
|
||||||
def _rescheduleRev(self, card, ease, early):
|
def _rescheduleRev(self, card, ease, early):
|
||||||
|
|
|
@ -1107,10 +1107,8 @@ def test_failmult():
|
||||||
c = d.sched.getCard()
|
c = d.sched.getCard()
|
||||||
d.sched.answerCard(c, 1)
|
d.sched.answerCard(c, 1)
|
||||||
assert c.ivl == 50
|
assert c.ivl == 50
|
||||||
# failing again, the actual elapsed interval is 0,
|
|
||||||
# so the card is reset to new
|
|
||||||
d.sched.answerCard(c, 1)
|
d.sched.answerCard(c, 1)
|
||||||
assert c.ivl == 1
|
assert c.ivl == 25
|
||||||
|
|
||||||
def test_moveVersions():
|
def test_moveVersions():
|
||||||
col = _getEmptyCol(schedVer=1)
|
col = _getEmptyCol(schedVer=1)
|
||||||
|
|
Loading…
Reference in a new issue