Merge branch 'master' of github.com:dae/anki

This commit is contained in:
Damien Elmes 2017-02-15 13:41:40 +10:00
commit 6d39c8f0cb

View File

@ -23,6 +23,7 @@ class CustomStudy(QDialog):
QDialog.__init__(self, mw) QDialog.__init__(self, mw)
self.mw = mw self.mw = mw
self.deck = self.mw.col.decks.current() self.deck = self.mw.col.decks.current()
self.conf = self.mw.col.decks.getConf(self.deck['conf'])
self.form = f = aqt.forms.customstudy.Ui_Dialog() self.form = f = aqt.forms.customstudy.Ui_Dialog()
f.setupUi(self) f.setupUi(self)
self.setWindowModality(Qt.WindowModal) self.setWindowModality(Qt.WindowModal)
@ -53,16 +54,22 @@ class CustomStudy(QDialog):
return "<b>"+str(num)+"</b>" return "<b>"+str(num)+"</b>"
if idx == RADIO_NEW: if idx == RADIO_NEW:
new = self.mw.col.sched.totalNewForCurrentDeck() new = self.mw.col.sched.totalNewForCurrentDeck()
self.deck['newToday'] # get the number of new cards in deck that exceed the new cards limit
tit = _("New cards in deck: %s") % plus(new) newUnderLearning = min(new, self.conf['new']['perDay'] - self.deck['newToday'][1])
newExceeding = min(new, new - newUnderLearning)
tit = _("New cards in deck over today limit: %s") % plus(newExceeding)
pre = _("Increase today's new card limit by") pre = _("Increase today's new card limit by")
sval = min(new, self.deck.get('extendNew', 10)) sval = min(new, self.deck.get('extendNew', 10))
smax = new smax = newExceeding
elif idx == RADIO_REV: elif idx == RADIO_REV:
rev = self.mw.col.sched.totalRevForCurrentDeck() rev = self.mw.col.sched.totalRevForCurrentDeck()
tit = _("Reviews due in deck: %s") % plus(rev) # get the number of review due in deck that exceed the review due limit
revUnderLearning = min(rev, self.conf['rev']['perDay'] - self.deck['revToday'][1])
revExceeding = min(rev, rev - revUnderLearning)
tit = _("Reviews due in deck over today limit: %s") % plus(revExceeding)
pre = _("Increase today's review limit by") pre = _("Increase today's review limit by")
sval = min(rev, self.deck.get('extendRev', 10)) sval = min(rev, self.deck.get('extendRev', 10))
smax = revExceeding
elif idx == RADIO_FORGOT: elif idx == RADIO_FORGOT:
pre = _("Review cards forgotten in last") pre = _("Review cards forgotten in last")
post = _("days") post = _("days")