mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 15:32:23 -04:00
add fn to extend today's limits (into the negatives allowed)
This commit is contained in:
parent
faa3c7134b
commit
f00b7201b4
2 changed files with 12 additions and 1 deletions
|
@ -20,7 +20,10 @@ defaultDeck = {
|
||||||
'usn': 0,
|
'usn': 0,
|
||||||
'desc': "",
|
'desc': "",
|
||||||
'dyn': 0,
|
'dyn': 0,
|
||||||
'collapsed': False
|
'collapsed': False,
|
||||||
|
# added in beta11
|
||||||
|
'extendNew': 10,
|
||||||
|
'extendRev': 50,
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultDynamicDeck = {
|
defaultDynamicDeck = {
|
||||||
|
|
|
@ -138,6 +138,14 @@ order by due""" % self._deckLimit(),
|
||||||
g[key][1] += cnt
|
g[key][1] += cnt
|
||||||
self.col.decks.save(g)
|
self.col.decks.save(g)
|
||||||
|
|
||||||
|
def extendLimits(self, new, rev):
|
||||||
|
cur = self.col.decks.current()
|
||||||
|
for g in [cur] + self.col.decks.parents(cur['id']):
|
||||||
|
# add
|
||||||
|
g['newToday'][1] -= new
|
||||||
|
g['revToday'][1] -= rev
|
||||||
|
self.col.decks.save(g)
|
||||||
|
|
||||||
def _walkingCount(self, limFn=None, cntFn=None):
|
def _walkingCount(self, limFn=None, cntFn=None):
|
||||||
tot = 0
|
tot = 0
|
||||||
pcounts = {}
|
pcounts = {}
|
||||||
|
|
Loading…
Reference in a new issue