当前位置: 首页>>代码示例>>Python>>正文


Python Block.__init__方法代码示例

本文整理汇总了Python中exe.webui.block.Block.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Block.__init__方法的具体用法?Python Block.__init__怎么用?Python Block.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在exe.webui.block.Block的用法示例。


在下文中一共展示了Block.__init__方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from exe.webui.block import Block [as 别名]
# 或者: from exe.webui.block.Block import __init__ [as 别名]
 def __init__(self, parent, idevice):
     Block.__init__(self, parent, idevice)
     self.mainElements = idevice.mainFieldSet.makeElementDict()
     self.memoryMatchElements = []
     for memoryMatchField in idevice.matchPairFields:
         memoryMatchElement = MemoryMatchPairElement(memoryMatchField)
         self.memoryMatchElements.append(memoryMatchElement)
开发者ID:Rafav,项目名称:iteexe,代码行数:9,代码来源:memorymatchblock.py

示例2: __init__

# 需要导入模块: from exe.webui.block import Block [as 别名]
# 或者: from exe.webui.block.Block import __init__ [as 别名]
 def __init__(self, parent, idevice):
     Block.__init__(self, parent, idevice)
     self.elements = []
     for field in self.idevice:
         self.elements.append(g_elementFactory.createElement(field))
     if not hasattr(self.idevice,'undo'): 
         self.idevice.undo = True
开发者ID:KatiaBorges,项目名称:exeLearning,代码行数:9,代码来源:genericblock.py

示例3: __init__

# 需要导入模块: from exe.webui.block import Block [as 别名]
# 或者: from exe.webui.block.Block import __init__ [as 别名]
 def __init__(self, parent, idevice):
     """
     'parent' is our parent 'Renderable' instance
     """
     Block.__init__(self, parent, idevice)
     if not hasattr(self.idevice,'undo'):
         self.idevice.undo = True
开发者ID:,项目名称:,代码行数:9,代码来源:

示例4: __init__

# 需要导入模块: from exe.webui.block import Block [as 别名]
# 或者: from exe.webui.block.Block import __init__ [as 别名]
    def __init__(self, parent, idevice):
        """
        Initialize a new Block object
        """
        Block.__init__(self, parent, idevice)
        self.idevice           = idevice
        self.questionElements  = []

        # to compensate for the strange unpickling timing when objects are 
        # loaded from an elp, ensure that proper idevices are set:
        if idevice.storyTextArea.idevice is None: 
            idevice.storyTextArea.idevice = idevice

        self.storyElement      = TextAreaElement(idevice.storyTextArea)

        self.questionInstruc   = idevice.questionInstruc
        self.storyInstruc      = idevice.storyInstruc
        self.feedbackInstruc   = idevice.feedbackInstruc
        self.previewing        = False # In view or preview render 

        if not hasattr(self.idevice,'undo'): 
            self.idevice.undo = True

        i = 0
        
        for question in idevice.questions:
            self.questionElements.append(QuestionElement(i, idevice, question))
            i += 1
开发者ID:KatiaBorges,项目名称:exeLearning,代码行数:30,代码来源:casestudyblock.py

示例5: __init__

# 需要导入模块: from exe.webui.block import Block [as 别名]
# 或者: from exe.webui.block.Block import __init__ [as 别名]
    def __init__(self, parent, idevice):
        """
        Initialize a new Block object
        """
        Block.__init__(self, parent, idevice)
        self.idevice         = idevice
        self.questionElements  = []
        self.questionInstruc = idevice.questionInstruc
        self.keyInstruc      = idevice.keyInstruc
        self.feedbackInstruc = idevice.feedbackInstruc
        self.hintInstruc     = idevice.hintInstruc 

        # to compensate for the strange unpickling timing when objects are 
        # loaded from an elp, ensure that proper idevices are set:
        if idevice.instructionsForLearners.idevice is None: 
            idevice.instructionsForLearners.idevice = idevice
        self.instructionElement = \
            TextAreaElement(idevice.instructionsForLearners)

        if not hasattr(self.idevice,'undo'):
            self.idevice.undo = True
        
        i = 0
        for question in idevice.questions:
            self.questionElements.append(OpinionElement(i, idevice, 
                                                           question))
            i += 1
开发者ID:kohnle-lernmodule,项目名称:palama,代码行数:29,代码来源:opinionblock.py

示例6: __init__

# 需要导入模块: from exe.webui.block import Block [as 别名]
# 或者: from exe.webui.block.Block import __init__ [as 别名]
    def __init__(self, parent, idevice):
        """
        Pre-create our field ids
        """
        Block.__init__(self, parent, idevice)
        
       
        # to compensate for the strange unpickling timing when objects are 
        # loaded from an elp, ensure that proper idevices are set:
        if idevice.instructionsForLearners.idevice is None: 
            idevice.instructionsForLearners.idevice = idevice
        if idevice.content.idevice is None: 
            idevice.content.idevice = idevice
        if idevice.feedback.idevice is None: 
            idevice.feedback.idevice = idevice
            
        dT = common.getExportDocType()
        sectionTag = "div"
        if dT == "HTML5":
            sectionTag = "section"
            
        idevice.instructionsForLearners.htmlTag = sectionTag
        idevice.instructionsForLearners.class_ = "block instructions"
        idevice.feedback.htmlTag = sectionTag            

        self.instructionElement = TextAreaElement(idevice.instructionsForLearners)
        self.instructionElement.field.content_w_resourcePaths = c_(self.instructionElement.field.content_w_resourcePaths)
        self.listaElement = ListaElement(idevice.content)
        self.feedbackElement = \
            TextAreaElement(idevice.feedback)
        self.previewing        = False # In view or preview render
        if not hasattr(self.idevice,'undo'): 
            self.idevice.undo = True
开发者ID:UstadMobile,项目名称:exelearning-ustadmobile-work,代码行数:35,代码来源:listablock.py

示例7: __init__

# 需要导入模块: from exe.webui.block import Block [as 别名]
# 或者: from exe.webui.block.Block import __init__ [as 别名]
 def __init__(self, parent, idevice):
     Block.__init__(self, parent, idevice)
     self.mainElements = idevice.mainFieldSet.makeElementDict()
     
     self.map_area_elements = []
     
     for area_field in self.idevice.map_areas:
         self.map_area_elements.append(ImageMapAreaElement(area_field, self))
开发者ID:UstadMobile,项目名称:exelearning-ustadmobile-work,代码行数:10,代码来源:imagemapblock.py

示例8: __init__

# 需要导入模块: from exe.webui.block import Block [as 别名]
# 或者: from exe.webui.block.Block import __init__ [as 别名]
    def __init__(self, parent, idevice):
        Block.__init__(self, parent, idevice)
        self.mainElements = idevice.mainFieldSet.makeElementDict()

        self.sortableItemElements = []
        for sortableField in idevice.itemsToSort:
            newSortableElement = TextAreaElement(sortableField)
            self.sortableItemElements.append(newSortableElement)
开发者ID:RichDijk,项目名称:eXe,代码行数:10,代码来源:sortblock.py

示例9: __init__

# 需要导入模块: from exe.webui.block import Block [as 别名]
# 或者: from exe.webui.block.Block import __init__ [as 别名]
 def __init__(self, parent, idevice):
     Block.__init__(self, parent, idevice)
     self.fileAttachmentElements = []
     for fileField in self.idevice.fileAttachmentFields:
         fileElement = FileElement(fileField, False)
         self.fileAttachmentElements.append(fileElement)
     
     self.showDescBlock = ChoiceElement(idevice.showDesc)
     self.introHTMLElement = TextAreaElement(idevice.introHTML)
开发者ID:UstadMobile,项目名称:exelearning-ustadmobile-work,代码行数:11,代码来源:fileattachblock.py

示例10: __init__

# 需要导入模块: from exe.webui.block import Block [as 别名]
# 或者: from exe.webui.block.Block import __init__ [as 别名]
    def __init__(self, parent, idevice):
        Block.__init__(self, parent, idevice)
        self.idevice = idevice
        self.termElements = []
        if not hasattr(self.idevice,'undo'): 
            self.idevice.undo = True

        for term in idevice.terms:
            self.termElements.append(TermElement(term))
开发者ID:KatiaBorges,项目名称:exeLearning,代码行数:11,代码来源:glossaryblock.py

示例11: __init__

# 需要导入模块: from exe.webui.block import Block [as 别名]
# 或者: from exe.webui.block.Block import __init__ [as 别名]
    def __init__(self, parent, idevice):
        Block.__init__(self, parent, idevice)
        if idevice.content.idevice is None: 
            # due to the loading process's timing, idevice wasn't yet set; 
            # set it here for the TextAreaElement's tinyMCE editor 
            idevice.content.idevice = idevice

        self.contentElement = TextAreaElement(idevice.content)
        self.contentElement.height = 250
        if not hasattr(self.idevice,'undo'): 
            self.idevice.undo = True
开发者ID:erral,项目名称:iteexe,代码行数:13,代码来源:freetextblock.py


注:本文中的exe.webui.block.Block.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。