# Path: exe/engine/field.py
# class TextAreaField(FieldWithResources):
#     """
#     A Generic iDevice is built up of these fields.  Each field can be
#     rendered as an XHTML element
# 
#     Note that TextAreaFields can now hold any number of image resources,
#     which will typically be inserted by way of tinyMCE.
#     """
#     persistenceVersion = 1
# 
#     # these will be recreated in FieldWithResources' TwistedRePersist:
#     nonpersistant      = ['content', 'content_wo_resourcePaths']
# 
#     def __init__(self, name, instruc="", content=""):
#         """
#         Initialize 
#         """
#         FieldWithResources.__init__(self, name, instruc, content)
# 
#     def upgradeToVersion1(self):
#         """
#         Upgrades to somewhere before version 0.25 (post-v0.24) 
#         to reflect that TextAreaField now inherits from FieldWithResources,
#         and will need its corresponding fields populated from content.
#         """ 
#         self.content_w_resourcePaths = self.content 
#         self.content_wo_resourcePaths = self.content
#         # NOTE: we don't need to actually process any of those contents for 
#         # image paths, either, since this is an upgrade from pre-images!
# 
# class FeedbackField(FieldWithResources):
#     """
#     A Generic iDevice is built up of these fields.  Each field can be
#     rendered as an XHTML element
#     """
# 
#     persistenceVersion = 2
# 
#     # these will be recreated in FieldWithResources' TwistedRePersist:
#     nonpersistant      = ['content', 'content_wo_resourcePaths']
# 
#     def __init__(self, name, instruc=""):
#         """
#         Initialize 
#         """
#         FieldWithResources.__init__(self, name, instruc)
# 
#         self._buttonCaption = x_(u"Click Here")
# 
#         self.feedback      = ""
#         # Note: now that FeedbackField extends from FieldWithResources,
#         # the above feedback attribute will likely be used much less than
#         # the following new content attribute, but remains in case needed.
#         self.content      = ""
#     
#     # Properties
#     buttonCaption = lateTranslate('buttonCaption')
# 
#     def upgradeToVersion1(self):
#         """
#         Upgrades to version 0.14
#         """
#         self.buttonCaption = self.__dict__['buttonCaption']
# 
#     def upgradeToVersion2(self):
#         """
#         Upgrades to somewhere before version 0.25 (post-v0.24) 
#         to reflect that FeedbackField now inherits from FieldWithResources,
#         and will need its corresponding fields populated from content.
#         [see also the related (and likely redundant) upgrades to FeedbackField 
#          in: idevicestore.py's  __upgradeGeneric() for readingActivity, 
#          and: genericidevice.py's upgradeToVersion9() for the same]
#         """ 
#         self.content = self.feedback 
#         self.content_w_resourcePaths = self.feedback 
#         self.content_wo_resourcePaths = self.feedback
#         # NOTE: we don't need to actually process any of those contents for 
#         # image paths, either, since this is an upgrade from pre-images!


from exe.engine         import persist
from exe.engine.idevice import Idevice
from exe.engine.field   import TextAreaField, FeedbackField
from nevow.flat         import flatten
        from exe.engine.freetextidevice       import FreeTextIdevice
        from exe.engine.multimediaidevice     import MultimediaIdevice
        from exe.engine.reflectionidevice     import ReflectionIdevice
        from exe.engine.casestudyidevice      import CasestudyIdevice
        from exe.engine.truefalseidevice      import TrueFalseIdevice
        from exe.engine.wikipediaidevice      import WikipediaIdevice
        from exe.engine.attachmentidevice     import AttachmentIdevice
        from exe.engine.titleidevice          import TitleIdevice
        from exe.engine.galleryidevice        import GalleryIdevice
        from exe.engine.clozeidevice          import ClozeIdevice
        from exe.engine.flashwithtextidevice  import FlashWithTextIdevice        
        from exe.engine.externalurlidevice    import ExternalUrlIdevice
        from exe.engine.imagemagnifieridevice import ImageMagnifierIdevice
        from exe.engine.multichoiceidevice    import MultichoiceIdevice        
        from exe.engine.rssidevice            import RssIdevice 
        from exe.engine.multiselectidevice    import MultiSelectIdevice
        from exe.engine.appletidevice         import AppletIdevice
        from exe.engine.flashmovieidevice     import FlashMovieIdevice
        from exe.engine.quiztestidevice       import QuizTestIdevice
        from exe.engine.genericidevice import GenericIdevice
        from exe.engine.genericidevice import GenericIdevice
import imp
import sys
import logging
                                        "different types of activity "
                                        "planned for your resource that "
                                        "will be visually signalled in the "
                                        "content. Avoid using too many "
                                        "different types or classification "
                                        "of activities otherwise learner "
                                        "may become confused. Usually three "
                                        "or four different types are more "
                                        "than adequate for a teaching "
                                        "resource."
                                        "</li>"
                                        "<li>"
                                        "From a visual design "
                                        "perspective, avoid having two "
                                        "iDevices immediately following "
                                        "each other without any text in "
                                        "between. If this is required, "
                                        "rather collapse two questions or "
                                        "events into one iDevice. "
                                        "</li>"
                                        "<li>"
                                        "Think "
                                        "about activities where the "
                                        "perceived benefit of doing the "
                                        "activity outweighs the time and "
                                        "effort it will take to complete "
                                        "the activity. "
                                        "</li>"
                                        "</ol>")) 
        readingAct.emphasis = Idevice.SomeEmphasis

# Path: exe/engine/field.py
# class TextAreaField(FieldWithResources):
#     """
#     A Generic iDevice is built up of these fields.  Each field can be
#     rendered as an XHTML element
# 
#     Note that TextAreaFields can now hold any number of image resources,
#     which will typically be inserted by way of tinyMCE.
#     """
#     persistenceVersion = 1
# 
#     # these will be recreated in FieldWithResources' TwistedRePersist:
#     nonpersistant      = ['content', 'content_wo_resourcePaths']
# 
#     def __init__(self, name, instruc="", content=""):
#         """
#         Initialize 
#         """
#         FieldWithResources.__init__(self, name, instruc, content)
# 
#     def upgradeToVersion1(self):
#         """
#         Upgrades to somewhere before version 0.25 (post-v0.24) 
#         to reflect that TextAreaField now inherits from FieldWithResources,
#         and will need its corresponding fields populated from content.
#         """ 
#         self.content_w_resourcePaths = self.content 
#         self.content_wo_resourcePaths = self.content
#         # NOTE: we don't need to actually process any of those contents for 
#         # image paths, either, since this is an upgrade from pre-images!
# 
# class FeedbackField(FieldWithResources):
#     """
#     A Generic iDevice is built up of these fields.  Each field can be
#     rendered as an XHTML element
#     """
# 
#     persistenceVersion = 2
# 
#     # these will be recreated in FieldWithResources' TwistedRePersist:
#     nonpersistant      = ['content', 'content_wo_resourcePaths']
# 
#     def __init__(self, name, instruc=""):
#         """
#         Initialize 
#         """
#         FieldWithResources.__init__(self, name, instruc)
# 
#         self._buttonCaption = x_(u"Click Here")
# 
#         self.feedback      = ""
#         # Note: now that FeedbackField extends from FieldWithResources,
#         # the above feedback attribute will likely be used much less than
#         # the following new content attribute, but remains in case needed.
#         self.content      = ""
#     
#     # Properties
#     buttonCaption = lateTranslate('buttonCaption')
# 
#     def upgradeToVersion1(self):
#         """
#         Upgrades to version 0.14
#         """
#         self.buttonCaption = self.__dict__['buttonCaption']
# 
#     def upgradeToVersion2(self):
#         """
#         Upgrades to somewhere before version 0.25 (post-v0.24) 
#         to reflect that FeedbackField now inherits from FieldWithResources,
#         and will need its corresponding fields populated from content.
#         [see also the related (and likely redundant) upgrades to FeedbackField 
#          in: idevicestore.py's  __upgradeGeneric() for readingActivity, 
#          and: genericidevice.py's upgradeToVersion9() for the same]
#         """ 
#         self.content = self.feedback 
#         self.content_w_resourcePaths = self.feedback 
#         self.content_wo_resourcePaths = self.feedback
#         # NOTE: we don't need to actually process any of those contents for 
#         # image paths, either, since this is an upgrade from pre-images!


# Path: exe/engine/idevicestore.py
from exe.engine         import persist
from exe.engine.idevice import Idevice
from exe.engine.field   import TextAreaField, FeedbackField
from nevow.flat         import flatten
        from exe.engine.freetextidevice       import FreeTextIdevice
        from exe.engine.multimediaidevice     import MultimediaIdevice
        from exe.engine.reflectionidevice     import ReflectionIdevice
        from exe.engine.casestudyidevice      import CasestudyIdevice
        from exe.engine.truefalseidevice      import TrueFalseIdevice
        from exe.engine.wikipediaidevice      import WikipediaIdevice
        from exe.engine.attachmentidevice     import AttachmentIdevice
        from exe.engine.titleidevice          import TitleIdevice
        from exe.engine.galleryidevice        import GalleryIdevice
        from exe.engine.clozeidevice          import ClozeIdevice
        from exe.engine.flashwithtextidevice  import FlashWithTextIdevice        
        from exe.engine.externalurlidevice    import ExternalUrlIdevice
        from exe.engine.imagemagnifieridevice import ImageMagnifierIdevice
        from exe.engine.multichoiceidevice    import MultichoiceIdevice        
        from exe.engine.rssidevice            import RssIdevice 
        from exe.engine.multiselectidevice    import MultiSelectIdevice
        from exe.engine.appletidevice         import AppletIdevice
        from exe.engine.flashmovieidevice     import FlashMovieIdevice
        from exe.engine.quiztestidevice       import QuizTestIdevice
        from exe.engine.genericidevice import GenericIdevice
        from exe.engine.genericidevice import GenericIdevice
import imp
import sys
import logging

                                        "different types of activity "
                                        "planned for your resource that "
                                        "will be visually signalled in the "
                                        "content. Avoid using too many "
                                        "different types or classification "
                                        "of activities otherwise learner "
                                        "may become confused. Usually three "
                                        "or four different types are more "
                                        "than adequate for a teaching "
                                        "resource."
                                        "</li>"
                                        "<li>"
                                        "From a visual design "
                                        "perspective, avoid having two "
                                        "iDevices immediately following "
                                        "each other without any text in "
                                        "between. If this is required, "
                                        "rather collapse two questions or "
                                        "events into one iDevice. "
                                        "</li>"
                                        "<li>"
                                        "Think "
                                        "about activities where the "
                                        "perceived benefit of doing the "
                                        "activity outweighs the time and "
                                        "effort it will take to complete "
                                        "the activity. "
                                        "</li>"
                                        "</ol>")) 
        readingAct.emphasis = Idevice.SomeEmphasis

        readingAct.addField(TextAreaField(_(u"What to read"), 