deck list shouldn't apply rev limit to 1+ day learning cards

This commit is contained in:
Damien Elmes 2012-09-09 02:49:00 +09:00
parent b66d1479c2
commit 958768ccfe

View file

@ -658,11 +658,17 @@ where queue = 1 and type = 2
self.col.db.mod = mod self.col.db.mod = mod
def _lrnForDeck(self, did): def _lrnForDeck(self, did):
return self.col.db.scalar( cnt = self.col.db.scalar(
""" """
select sum(left/1000) from select sum(left/1000) from
(select left from cards where did = ? and queue = 1 and due < ? limit ?)""", (select left from cards where did = ? and queue = 1 and due < ? limit ?)""",
did, intTime() + self.col.conf['collapseTime'], self.reportLimit) or 0 did, intTime() + self.col.conf['collapseTime'], self.reportLimit) or 0
return cnt + self.col.db.scalar(
"""
select count() from
(select 1 from cards where did = ? and queue = 3
and due <= ? limit ?)""",
did, self.today, self.reportLimit)
# Reviews # Reviews
########################################################################## ##########################################################################
@ -681,7 +687,7 @@ select sum(left/1000) from
return self.col.db.scalar( return self.col.db.scalar(
""" """
select count() from select count() from
(select 1 from cards where did = ? and queue in (2,3) (select 1 from cards where did = ? and queue = 2
and due <= ? limit ?)""", and due <= ? limit ?)""",
did, self.today, lim) did, self.today, lim)