+ typ = element.attrib['typ']
+ handler = excercise_handlers[typ](self.options)
+ return handler.generate(element)
+
+ # Lists
+ def handle_lista(self, element):
+ ltype = element.attrib.get('typ', 'punkt')
+ if ltype == 'slowniczek':
+ self.options = {'slowniczek': True}
+ return '<div class="slowniczek">', '</div>'
+### robie teraz punkty wyboru
+ listtag = {'num': 'ol',
+ 'punkt': 'ul',
+ 'alfa': 'ul',
+ 'czytelnia': 'ul'}[ltype]
+
+ return '<%s class="lista %s">' % (listtag, ltype), '</%s>' % listtag
+
+ def handle_punkt(self, element):
+ if self.options['slowniczek']:
+ return '<dl>', '</dl>'
+ else:
+ return '<li>', '</li>'
+
+ def handle_rdf__RDF(self, _):
+ # ustal w opcjach rzeczy :D
+ return
+
+
+class Excercise(EduModule):
+ def __init__(self, *args, **kw):
+ self.question_counter = 0
+ super(Excercise, self).__init__(*args, **kw)
+