<div class="activity">
<div class="text">
<span class="act_counter">%(counter)d.</span>
- %(opis)s
- %(wskazowki)s
+ %(opis)s""" % locals(), \
+u"""%(wskazowki)s
</div>
<aside class="info">
<section class="infobox time"><h1>Czas</h1><p>%(czas)s min</p></section>
pre, post = super(Wybor, self).handle_cwiczenie(element)
is_single_choice = True
pytania = element.xpath(".//pytanie")
- if not pytania:
+ if not pytania:
pytania = [element]
for p in pytania:
solutions = re.split(r"[, ]+", p.attrib['rozw'])
if len(solutions) != 1:
is_single_choice = False
break
- choices = element.xpath(".//*[@nazwa]")
+ choices = p.xpath(".//*[@nazwa]")
uniq = set()
for n in choices: uniq.add(n.attrib['nazwa'])
if len(choices) != len(uniq):
return question.xpath(".//luka")
def solution_html(self, piece):
- return piece.text + ''.join(
- [etree.tostring(n, encoding=unicode)
- for n in piece])
+ sub = EduModule()
+ return sub.generate(piece)
+ # print piece.text
+ # return piece.text + ''.join(
+ # [etree.tostring(n, encoding=unicode)
+ # for n in piece])
def handle_pytanie(self, element):
qpre, qpost = super(Luki, self).handle_pytanie(element)