예제 #1
0
파일: content.py 프로젝트: anandsoft/pyslet
 def add_child(self, childClass, name=None):
     if issubclass(childClass, html.BlockMixin):
         return BodyElement.add_child(self, childClass, name)
     else:
         raise core.QTIValidityError(
             "%s (%s) in %s" %
             (repr(name), childClass.__name__, self.__class__.__name__))
예제 #2
0
파일: imsqtiv2p1.py 프로젝트: saxix/pyslet
 def ChildElement(self, childClass, name=None):
     if issubclass(childClass, html.BlockMixin):
         return content.BodyElement.ChildElement(self, childClass, name)
     else:
         # This child cannot go in here
         raise core.QTIValidityError(
             "%s in %s" % (repr(name), self.__class__.__name__))
예제 #3
0
 def add_child(self, childClass, name=None):
     if issubclass(childClass, html.InlineMixin):
         return Choice.add_child(self, childClass, name)
     else:
         # This child cannot go in here
         raise core.QTIValidityError("%s in %s" %
                                     (repr(name), self.__class__.__name__))
예제 #4
0
 def add_child(self, childClass, name=None):
     if issubclass(childClass, (Prompt, html.BlockMixin)):
         return BlockInteraction.add_child(self, childClass, name)
     else:
         # This child cannot go in here
         raise core.QTIValidityError("%s in %s" %
                                     (repr(name), self.__class__.__name__))
예제 #5
0
 def add_child(self, childClass, name=None):
     if issubclass(childClass, html.InlineMixin):
         return content.BodyElement.add_child(self, childClass, name)
     else:
         # This child cannot go in here
         raise core.QTIValidityError(
             "%s in %s" % (childClass.__name__, self.__class__.__name__))
예제 #6
0
 def add_child(self, childClass, name=None):
     if issubclass(childClass, content.PrintedVariable):
         return Choice.add_child(self, childClass, name)
     else:
         # This child cannot go in here
         raise core.QTIValidityError(
             "%s in %s" % (childClass.__name__, self.__class__.__name__))