report new cards as new always, make sure they come before vhp if 'show first'

This commit is contained in:
Damien Elmes 2009-02-21 18:23:55 +09:00
parent 12f73ef52a
commit 7a12888eb2

View file

@ -198,13 +198,13 @@ limit 1""")
"True if it's time to display a new card when distributing."
if self.newCardSpacing == NEW_CARDS_LAST:
return False
if self.newCardSpacing == NEW_CARDS_FIRST:
return True
# force old if there are very high priority cards
if self.s.scalar(
"select 1 from cards where type = 1 and isDue = 1 "
"and priority = 4 limit 1"):
return False
if self.newCardSpacing == NEW_CARDS_FIRST:
return True
if self.newCardModulus:
return self._dailyStats.reps % self.newCardModulus == 0
else:
@ -872,9 +872,6 @@ and due < :now""", now=time.time())
def queueForCard(self, card):
"Return the queue the current card is in."
if self.cardIsNew(card):
if card.priority == 4:
return "rev"
else:
return "new"
elif card.successive == 0:
return "failed"