From cb765bcb721118469d45b10b2181fbcd0d4d494e Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 17 Dec 2008 00:41:13 +0900 Subject: [PATCH] deck stats should show all new cards, not just due --- anki/deck.py | 5 +++++ anki/stats.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/anki/deck.py b/anki/deck.py index d3c9873af..5a14b2191 100644 --- a/anki/deck.py +++ b/anki/deck.py @@ -699,6 +699,11 @@ and due < :now""", now=time.time()) "select count(id) from cards where interval < :t " "and reps != 0", t=MATURE_THRESHOLD) + def newCountAll(self): + "All new cards, including spaced." + return self.s.scalar( + "select count(id) from cards where type = 2") + # Card predicates ########################################################################## diff --git a/anki/stats.py b/anki/stats.py index f360905d0..19c8e3bc7 100644 --- a/anki/stats.py +++ b/anki/stats.py @@ -315,7 +315,7 @@ class DeckStats(object): html="

" + _("Deck Statistics") + "

" html += _("Deck created: %s ago
") % self.createdTimeStr() total = d.cardCount - new = d.newCount + new = d.newCountAll() young = d.youngCardCount() old = d.matureCardCount() newP = new / float(total) * 100