X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/d329e7e5c88a9445e10083536ae1549e6fc1a1be..e7471348f9839fec053b6ccbf3c6c8a2b06fe8aa:/librarian/pyhtml.py?ds=inline 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