From 0d3fb261fc396c2f8f66018ff923bf202e869b35 Mon Sep 17 00:00:00 2001 From: Marcin Koziej Date: Wed, 2 Jan 2013 12:56:05 +0100 Subject: [PATCH 1/1] wybor - label Luki, zastap --- librarian/pyhtml.py | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/librarian/pyhtml.py b/librarian/pyhtml.py index f362715..64629d7 100644 --- a/librarian/pyhtml.py +++ b/librarian/pyhtml.py @@ -14,6 +14,7 @@ class EduModule(Xmill): self.activity_counter = 0 + # def handle_utwor(self, element): # v = {} # # from pdb import *; set_trace() @@ -187,10 +188,10 @@ class Wybor(Excercise): qc = self.question_counter self.piece_counter += 1 no = self.piece_counter - + eid = "q%(qc)d_%(no)d" % locals() return u""" -
  • -""" % locals(), u"
  • " +
  • " else: return super(Wybor, self).handle_punkt(element) @@ -203,7 +204,7 @@ class Uporzadkuj(Excercise): import pdb if order_items == []: pdb.set_trace() - return pre + u"""
    """ % \ + return pre + u"""
    """ % \ ','.join(order_items), \ u"""
    """ + post @@ -212,6 +213,19 @@ class Uporzadkuj(Excercise): "" +class Luki(Excercise): + def handle_luka(self, element): + return '' % element.text, \ + '' + + +class Zastap(Excercise): + def handle_zastap(self, element): + return '' % element.attrib, '' + + + + def transform(wldoc, stylesheet='edumed', options=None, flags=None): """Transforms the WL document to XHTML. -- 2.20.1