mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 22:42:25 -04:00
if user gets type answer wrong, show correct answer
Users could previously do that by putting the field in the template, but as so many users think they've hit a bug when they've actually selected the wrong field to compare to, we force the display of the field content instead.
This commit is contained in:
parent
b77ab05421
commit
fc8ee29ffd
1 changed files with 2 additions and 0 deletions
|
@ -375,6 +375,8 @@ Please run Tools>Maintenance>Empty Cards""")
|
|||
given = self.typedAnswer
|
||||
# compare with typed answer
|
||||
res = self.correct(cor, given)
|
||||
if cor != given:
|
||||
res += "<br>" + _("Correct answer was:") + "<br>" + cor
|
||||
# and update the type answer area
|
||||
return re.sub(self.typeAnsPat, """
|
||||
<span style="font-family: '%s'; font-size: %spx">%s</span>""" %
|
||||
|
|
Loading…
Reference in a new issue