X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/3b0b98465bc1862306b05bb8305a1abbf40ca310..1ef7c1807a866e5d8fb99238499be4ea240dceae:/librarian/pyhtml.py diff --git a/librarian/pyhtml.py b/librarian/pyhtml.py index 163d11c..3bda4c8 100644 --- a/librarian/pyhtml.py +++ b/librarian/pyhtml.py @@ -131,7 +131,7 @@ class EduModule(Xmill): counter = self.activity_counter - if element.getnext().tag == 'aktywnosc' or (self.activity_last and self.activity_last.getnext() == element): + if element.getnext().tag == 'aktywnosc' or (len(self.activity_last) and self.activity_last.getnext() == element): counter_html = """%(counter)d.""" % {'counter': counter} else: counter_html = '' @@ -351,13 +351,18 @@ class Exercise(EduModule): def handle_rozw_kom(self, element): return u"""
""" + def extra_attributes(self): + return {} + def handle_cwiczenie(self, element): self.options = {'exercise': element.attrib['typ']} self.question_counter = 0 self.piece_counter = 0 + extra_attrs = self.extra_attributes() + pre = u""" -