add class to question/answer

This commit is contained in:
Damien Elmes 2009-06-08 13:39:17 +09:00
parent 845aede221
commit c9f78cb7b6

View file

@ -113,8 +113,9 @@ class Card(object):
self.fuzz = random.uniform(0.95, 1.05) self.fuzz = random.uniform(0.95, 1.05)
def htmlQuestion(self, type="question", align=True): def htmlQuestion(self, type="question", align=True):
div = '''<div id="cm%s%s">%s</div>''' % ( div = '''<div class="card%s" id="cm%s%s">%s</div>''' % (
type[0], hexifyID(self.cardModelId), getattr(self, type)) type[0], type[0], hexifyID(self.cardModelId),
getattr(self, type))
# add outer div & alignment (with tables due to qt's html handling) # add outer div & alignment (with tables due to qt's html handling)
if not align: if not align:
return div return div