%(counter)d.
+
%(counter)d.
%(opis)s
%(wskazowki)s
@@ -76,27 +79,28 @@ class EduModule(Xmill):
handle_opis = ifoption(activity=False)(tag('div', 'description'))
handle_wskazowki = ifoption(activity=False)(tag('div', ('hints', 'teacher')))
-
+
@ifoption(activity=False)
@tagged('div', 'materials')
def handle_pomoce(self, _):
return "Pomoce: ", ""
-
+
def handle_czas(self, *_):
return
def handle_forma(self, *_):
return
-
+
def handle_cwiczenie(self, element):
excercise_handlers = {
'wybor': Wybor,
'uporzadkuj': Uporzadkuj,
'luki': Luki,
'zastap': Zastap,
- 'przyporzadkuj': Przyporzadkuj
+ 'przyporzadkuj': Przyporzadkuj,
+ 'prawdafalsz': PrawdaFalsz
}
-
+
typ = element.attrib['typ']
handler = excercise_handlers[typ](self.options)
return handler.generate(element)
@@ -108,17 +112,17 @@ class EduModule(Xmill):
self.options = {'slowniczek': True}
return '
', '
'
### robie teraz punkty wyboru
- listtag = {'num': 'ol',
- 'punkt': 'ul',
- 'alfa': 'ul',
+ listtag = {'num': 'ol',
+ 'punkt': 'ul',
+ 'alfa': 'ul',
'czytelnia': 'ul'}[ltype]
classes = attrs.get('class', '')
if classes: del attrs['class']
-
+
attrs_s = ' '.join(['%s="%s"' % kv for kv in attrs.items()])
if attrs_s: attrs_s = ' ' + attrs_s
-
+
return '<%s class="lista %s %s"%s>' % (listtag, ltype, classes, attrs_s), '%s>' % listtag
def handle_punkt(self, element):
@@ -127,9 +131,25 @@ class EduModule(Xmill):
else:
return '
', ''
+
+ def handle_podpis(self, element):
+ return u"""
""", u"
"
+
+ def handle_tabela(self, element):
+ has_frames = int(element.attrib.get("ramki", "0"))
+ if has_frames: frames_c = "framed"
+ else: frames_c = ""
+ return u"""
"
+
+ def handle_wiersz(self, element):
+ return u"
", u"
"
+
+ def handle_kol(self, element):
+ return u"
", u" | "
+
def handle_rdf__RDF(self, _):
# ustal w opcjach rzeczy :D
- return
+ return
class Excercise(EduModule):
@@ -138,7 +158,7 @@ class Excercise(EduModule):
super(Excercise, self).__init__(*args, **kw)
def handle_rozw_kom(self, element):
- return None
+ return u""""""
def handle_cwiczenie(self, element):
self.options = {'excercise': element.attrib['typ']}
@@ -153,7 +173,9 @@ class Excercise(EduModule):
+
+
@@ -164,31 +186,60 @@ class Excercise(EduModule):
pre = pre + qpre
post = qpost + post
return pre, post
-
+
def handle_pytanie(self, element):
"""This will handle