fix seen card count in kanji, fix display bug

This commit is contained in:
Damien Elmes 2008-11-15 17:50:46 +09:00
parent 97cf06b333
commit 4e937bf72a
2 changed files with 2 additions and 2 deletions

View file

@ -647,7 +647,7 @@ select count(id) from cards where type in (0,1,2) and priority = 0""")
def seenCardCount(self): def seenCardCount(self):
return self.s.scalar( return self.s.scalar(
"select count(id) from cards where type = 2") "select count(id) from cards where type != 2")
# Counts related to due cards # Counts related to due cards
########################################################################## ##########################################################################

View file

@ -527,7 +527,7 @@ cards.factId = fields.factId
for (name, all), found in zip(self.kanjiGrades, self.kanjiSets)] for (name, all), found in zip(self.kanjiGrades, self.kanjiSets)]
out = (_("<h1>Kanji statistics</h1>The %d seen cards in this deck " out = (_("<h1>Kanji statistics</h1>The %d seen cards in this deck "
"contain:") % self.deck.seenCardCount() + "contain:") % self.deck.seenCardCount() +
"<br/><ul>" + "<ul>" +
# total kanji # total kanji
_("<li>%d total unique kanji.</li>") % _("<li>%d total unique kanji.</li>") %
sum([c[1] for c in counts]) + sum([c[1] for c in counts]) +