Skip to content

Commit

Permalink
Fixed (instead of commenting) faulty code in reviewer.py
Browse files Browse the repository at this point in the history
Based on datphan310 proposal to fix reviewer.py #58
I tested it locally and it works
  • Loading branch information
fylux committed Dec 26, 2021
1 parent 00297e6 commit 4bed9a1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions reviewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ def bottomHTML(self):
)

def showAnswerButton(self):
#if not self.typeCorrect:
# self.bottom.web.setFocus()
if not self.typeCorrect:
self.mw.web.setFocus()
middle = """
<span class=stattxt>%s</span><br>
<button style='color: {THEME[buttons-label-color]} ;background-color:{THEME[buttons-color]}' class='btn btn-sm' title="%s" id=ansbut onclick='pycmd("ans");'>%s</button>""".format(THEME=THEME) % (
Expand All @@ -78,7 +78,7 @@ def showAnswerButton(self):
% middle
)
if self.card.shouldShowTimer():
maxTime = self.card.timeLimit() / 1000
maxTime = self.card.time_limit() / 1000
else:
maxTime = 0
self.bottom.web.eval("showQuestion(%s,%d);" % (json.dumps(middle), maxTime))
Expand Down

0 comments on commit 4bed9a1

Please sign in to comment.