+ def handle_pytanie(self, element):
+ qpre, qpost = super(Luki, self).handle_pytanie(element)
+
+ luki = list(enumerate(element.xpath("//luka")))
+ luki_html = ""
+ i = 0
+ random.shuffle(luki)
+ for (i, luka) in luki:
+ i += 1
+ luka_html = luka.text + \
+ ''.join([etree.tostring(n, encoding=unicode) for n in luka])
+ luki_html += u'<span class="draggable question-piece" data-no="%d">%s</span>' % (i, luka_html)
+ self.words_html = '<div class="words">%s</div>' % luki_html
+
+ return qpre, qpost
+
+ def handle_opis(self, element):
+ pre, post = super(Luki, self).handle_opis(element)
+ return pre, self.words_html + post
+