X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/f3e3374103ee892540927b65acc2231a10e493b7..e7471348f9839fec053b6ccbf3c6c8a2b06fe8aa:/librarian/pyhtml.py diff --git a/librarian/pyhtml.py b/librarian/pyhtml.py index 096e1f6..7816a40 100644 --- a/librarian/pyhtml.py +++ b/librarian/pyhtml.py @@ -28,6 +28,7 @@ class EduModule(Xmill): def __init__(self, options=None): super(EduModule, self).__init__(options) self.activity_counter = 0 + self.activity_last = None self.exercise_counter = 0 # text filters @@ -113,10 +114,17 @@ class EduModule(Xmill): counter = self.activity_counter + if element.getnext().tag == 'aktywnosc' or self.activity_last.getnext() == element: + counter_html = """%(counter)d.""" % locals() + else: + counter_html = '' + + self.activity_last = element + return u"""
- %(counter)d. + %(counter_html)s %(opis)s""" % locals(), \ u"""%(wskazowki)s