Merge branch 'master' of git://ichi2.net/libanki

This commit is contained in:
Timo Paulssen 2008-12-19 00:51:34 +01:00
commit 2c85801006
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 " "select count(id) from cards where interval < :t "
"and reps != 0", t=MATURE_THRESHOLD) "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 # Card predicates
########################################################################## ##########################################################################

View file

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