apply selective to card/fact counts

This commit is contained in:
Damien Elmes 2011-03-30 20:52:38 +09:00
parent 525787b33f
commit b5c8ba7b9f

View file

@ -358,8 +358,11 @@ order by thetype, ease""" % lim)
d.append(dict(data=div[c], label=t, color=col)) d.append(dict(data=div[c], label=t, color=col))
# text data # text data
i = [] i = []
self._line(i, _("Total Cards"), self.deck.cardCount()) (c, f) = self.deck.db.first("""
self._line(i, _("Total Facts"), self.deck.factCount()) select count(id), count(distinct fid) from cards
where 1 """ + self._limit())
self._line(i, _("Total Cards"), c)
self._line(i, _("Total Facts"), f)
(low, avg, high) = self._factors() (low, avg, high) = self._factors()
self._line(i, _("Lowest ease factor"), "%d%%" % low) self._line(i, _("Lowest ease factor"), "%d%%" % low)
self._line(i, _("Average ease factor"), "%d%%" % avg) self._line(i, _("Average ease factor"), "%d%%" % avg)