don't send acq cards when there are cards to review & new cards shown last

This commit is contained in:
Damien Elmes 2010-02-05 13:07:42 +09:00
parent 09f51e27f0
commit c659660864

View file

@ -321,7 +321,8 @@ type, due, interval, factor, priority from """
cards where type = 0 and isDue = 1 and
combinedDue <= :now limit 30""", now=time.time())
d['rev'] = self.s.all(sel + rev + " limit 30")
if self.newCountToday:
if self.newCountToday and (self.newCardSpacing != NEW_CARDS_LAST or
not d['rev']):
d['acq'] = self.s.all(sel + """
%s where factId in (select distinct factId from cards
where factId in (select factId from %s limit 60))""" % (new, new))