mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
allow user to disable review spacing
This commit is contained in:
parent
be8eec52bc
commit
523adc468e
1 changed files with 6 additions and 2 deletions
|
@ -831,7 +831,11 @@ limit %s""" % (self.cramOrder, self.queueLimit)))
|
||||||
|
|
||||||
def _spaceCards(self, card):
|
def _spaceCards(self, card):
|
||||||
new = time.time() + self.newSpacing
|
new = time.time() + self.newSpacing
|
||||||
# space cards
|
# space reviews too if integer minute
|
||||||
|
if self.newSpacing % 60 == 0:
|
||||||
|
lim = "between 1 and 2"
|
||||||
|
else:
|
||||||
|
lim = "= 2"
|
||||||
self.s.statement("""
|
self.s.statement("""
|
||||||
update cards set
|
update cards set
|
||||||
combinedDue = (case
|
combinedDue = (case
|
||||||
|
@ -841,7 +845,7 @@ end),
|
||||||
modified = :now, isDue = 0
|
modified = :now, isDue = 0
|
||||||
where id != :id and factId = :factId
|
where id != :id and factId = :factId
|
||||||
and combinedDue < :cut
|
and combinedDue < :cut
|
||||||
and type between 1 and 2""",
|
and type %s""" % lim,
|
||||||
id=card.id, now=time.time(), factId=card.factId,
|
id=card.id, now=time.time(), factId=card.factId,
|
||||||
cut=self.dueCutoff, new=new)
|
cut=self.dueCutoff, new=new)
|
||||||
# update local cache of seen facts
|
# update local cache of seen facts
|
||||||
|
|
Loading…
Reference in a new issue