mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
apply selective study to review early
This commit is contained in:
parent
3d5a427f85
commit
98fb0f5bb9
1 changed files with 10 additions and 7 deletions
17
anki/deck.py
17
anki/deck.py
|
@ -503,16 +503,19 @@ where type >= 0
|
||||||
|
|
||||||
def _rebuildRevEarlyCount(self):
|
def _rebuildRevEarlyCount(self):
|
||||||
# in the future it would be nice to skip the first x days of due cards
|
# in the future it would be nice to skip the first x days of due cards
|
||||||
extraLim = ""
|
self.revCount = self.s.scalar(
|
||||||
self.revCount = self.s.scalar("""
|
self.cardLimit(
|
||||||
select count() from cards where type = 1 and combinedDue > :now
|
"revActive", "revInactive", """
|
||||||
%s""" % extraLim, now=self.dueCutoff)
|
select count() from cards c where type = 1 and combinedDue > :now
|
||||||
|
"""), now=self.dueCutoff)
|
||||||
|
|
||||||
def _fillRevEarlyQueue(self):
|
def _fillRevEarlyQueue(self):
|
||||||
if self.revCount and not self.revQueue:
|
if self.revCount and not self.revQueue:
|
||||||
self.revQueue = self.s.all("""
|
self.revQueue = self.s.all(
|
||||||
select id, factId from cards where type = 1 and combinedDue > :lim
|
self.cardLimit(
|
||||||
order by combinedDue limit %d""" % self.queueLimit, lim=self.dueCutoff)
|
"revActive", "revInactive", """
|
||||||
|
select id, factId from cards c where type = 1 and combinedDue > :lim
|
||||||
|
order by combinedDue limit %d""" % self.queueLimit), lim=self.dueCutoff)
|
||||||
self.revQueue.reverse()
|
self.revQueue.reverse()
|
||||||
|
|
||||||
# Learn more
|
# Learn more
|
||||||
|
|
Loading…
Reference in a new issue