deck stats should show all new cards, not just due

This commit is contained in:
Damien Elmes 2008-12-17 00:41:13 +09:00
parent dabe170bed
commit cb765bcb72
2 changed files with 6 additions and 1 deletions

View file

@ -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
##########################################################################

View file

@ -315,7 +315,7 @@ class DeckStats(object):
html="<h1>" + _("Deck Statistics") + "</h1>"
html += _("Deck created: <b>%s</b> ago<br>") % self.createdTimeStr()
total = d.cardCount
new = d.newCount
new = d.newCountAll()
young = d.youngCardCount()
old = d.matureCardCount()
newP = new / float(total) * 100