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__))
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__))
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__))
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__))
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__))
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__))