include reviews in spaced card count; bold text

This commit is contained in:
Damien Elmes 2010-12-26 06:01:24 +09:00
parent 63106578cd
commit 856839e055

View file

@ -1168,9 +1168,9 @@ and type between 0 and 1""", time=time)
spaceSusp = "" spaceSusp = ""
c= self.spacedCardCount() c= self.spacedCardCount()
if c: if c:
spaceSusp += ngettext('There is %d delayed new card.', spaceSusp += ngettext(
'There are %d delayed new cards.', 'There is <b>%d delayed</b> card.',
c) % c 'There are <b>%d delayed</b> cards.', c) % c
c2 = self.suspendedCardCount() c2 = self.suspendedCardCount()
if c2: if c2:
if spaceSusp: if spaceSusp:
@ -1344,11 +1344,10 @@ select count(id) from cards where type < 0""")
self._dailyStats.newEase4) self._dailyStats.newEase4)
def spacedCardCount(self): def spacedCardCount(self):
"Number of spaced new cards." "Number of spaced cards."
return self.s.scalar(""" return self.s.scalar("""
select count(cards.id) from cards where select count(cards.id) from cards where
relativeDelay = 2 and combinedDue > :now combinedDue > :now and due < :now""", now=time.time())
and due < :now""", now=time.time())
def isEmpty(self): def isEmpty(self):
return not self.cardCount return not self.cardCount