Merge pull request #21 from ospalh/id-correct-answer

Wrap the "Correct answer was" bit in a span with an id.
This commit is contained in:
Damien Elmes 2012-07-05 07:53:04 -07:00
commit beb580117c

View file

@ -376,7 +376,9 @@ Please run Tools>Maintenance>Empty Cards""")
# compare with typed answer
res = self.correct(cor, given)
if cor != given:
res += "<br>" + _("Correct answer was:") + "<br>" + cor
# Wrap the extra text in an id-ed span.
res += '<span id=rightanswer><br> {0} <br> {1} </span>'.format(
_("Correct answer was:"), cor)
# and update the type answer area
return re.sub(self.typeAnsPat, """
<span style="font-family: '%s'; font-size: %spx">%s</span>""" %