mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
total new/rev for deck count
This commit is contained in:
parent
da856552b2
commit
627bd1b1b3
1 changed files with 14 additions and 0 deletions
|
@ -399,6 +399,13 @@ select count() from
|
|||
c = self.col.decks.confForDid(g['id'])
|
||||
return max(0, c['new']['perDay'] - g['newToday'][1])
|
||||
|
||||
def totalNewForCurrentDeck(self):
|
||||
return self.col.db.scalar(
|
||||
"""
|
||||
select count() from cards where id in (
|
||||
select id from cards where did in %s and queue = 0 limit ?)"""
|
||||
% ids2str(self.col.decks.active()), self.reportLimit)
|
||||
|
||||
# Learning queues
|
||||
##########################################################################
|
||||
|
||||
|
@ -743,6 +750,13 @@ did = ? and queue = 2 and due <= ? limit ?""",
|
|||
self.revCount -= 1
|
||||
return self.col.getCard(self._revQueue.pop())
|
||||
|
||||
def totalRevForCurrentDeck(self):
|
||||
return self.col.db.scalar(
|
||||
"""
|
||||
select count() from cards where id in (
|
||||
select id from cards where did in %s and queue = 2 limit ?)"""
|
||||
% ids2str(self.col.decks.active()), self.reportLimit)
|
||||
|
||||
# Answering a review card
|
||||
##########################################################################
|
||||
|
||||
|
|
Loading…
Reference in a new issue