Wrap the "Correct answer was" bit in a span with an id.

This commit is contained in:
ospalh 2012-07-05 16:15:17 +02:00
parent b1121ebfc1
commit fabe8572b9

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>""" %