def __init__(self):
        """
        Initialize 
        """
        Idevice.__init__(
            self, x_(u"Opinion Question"), x_(u"University of Auckland"),
            x_(u"""Opinion questions present a statement where 
the learner must decide if he agrees or disagrees."""), u"", u"question")
        self.emphasis = Idevice.SomeEmphasis
        self._hintInstruc = x_(u"""A hint may be provided to assist the 
learner in answering the question.""")
        self.questions = []
        self._questionInstruc = x_(u"""Type the question stem. The question 
should be clear and unambiguous. Avoid negative premises as these can tend to 
be ambiguous.""")
        self._keyInstruc = ""
        self._feedbackInstruc = x_(u"""Enter any feedback you wish to provide 
to the learner. This field may be left blank. if this field is left blank 
default feedback will be provided.""")
        self.questions.append(OpinionQuestion(self))
        self.systemResources += [
            "common.js", "libot_drag.js", "panel-amusements.png",
            "stock-stop.png"
        ]
        self.instructionsForLearners = TextAreaField(
            x_(u'Instructions'),
            x_(u"""Provide instruction on how the Opinion Question should be 
completed."""), u'')

        self.instructionsForLearners.idevice = self
        self.icon = u"activity"
Example #2
0
    def __init__(self, activity = "", answer = ""):
        """
        Initialize 
        """
        Idevice.__init__(self, 
                         x_(u"Reflection"),
                         x_(u"University of Auckland"), 
                         x_(u"""Reflection is a teaching method often used to 
connect theory to practice. Reflection tasks often provide learners with an 
opportunity to observe and reflect on their observations before presenting 
these as a piece of academic work. Journals, diaries, profiles and portfolios 
are useful tools for collecting observation data. Rubrics and guides can be 
effective feedback tools."""), u"", u"reflection")
        self.emphasis         = Idevice.SomeEmphasis
        self._activityInstruc = x_(u"""Enter a question for learners 
to reflect upon.""")
        self._answerInstruc   = x_(u"""Describe how learners will assess how 
they have done in the exercise (rubrics are useful devices for providing 
reflective feedback).""")
        self.systemResources += ["common.js"]
        
        self.activityTextArea = TextAreaField(x_(u'Reflective question:'), 
                                    self._activityInstruc, activity)
        self.activityTextArea.idevice = self

        self.answerTextArea = TextAreaField(x_(u'Feedback:'), 
                                   self._answerInstruc, answer)
        self.answerTextArea.idevice = self
    def __init__(self, parentNode=None):
        """
        Sets up the idevice title and instructions etc
        """
        Idevice.__init__(self, 
                         x_(u"Java Applet"), 
                         x_(u"University of Auckland"), 
                         u"",
                         u"",
                         u"",
                             parentNode)
        self.emphasis          = Idevice.NoEmphasis
        self.appletCode        = u""
        self.type              = u"other"
        self._fileInstruc      = x_(u"""Add all the files provided for the applet
except the .txt file one at a time using the add files and upload buttons. The 
files, once loaded will be displayed beneath the Applet code field.""")
        self._codeInstruc      = x_(u""""Find the .txt file (in the applet file) 
and open it. Copy the contents of this file <ctrl A, ctrl C> into the applet 
code field.""")
        self._typeInstruc     = x_(u""" <p>If the applet you're adding was generated 
by one of the programs in this drop down, please select it, 
then add the data/applet file generated by your program. </p>
<p>eg. For Geogebra applets, select geogebra, then add the .ggb file that 
you created in Geogebra.</p>""")
        self.message          = ""
Example #4
0
    def __init__(self, defaultSite):
        Idevice.__init__(
            self, x_(u"Wiki Article"), x_(u"University of Auckland"),
            x_(u"""<p>The Wikipedia iDevice allows you to locate 
existing content from within Wikipedia and download this content into your eXe 
resource. The Wikipedia Article iDevice takes a snapshot copy of the article 
content. Changes in Wikipedia will not automatically update individual snapshot 
copies in eXe, a fresh copy of the article will need to be taken. Likewise, 
changes made in eXe will not be updated in Wikipedia. </p> <p>Wikipedia content 
is covered by the GNU Free Documentation 1.2 License, and since 2009 additionally
by the Creative Commons Attribution-ShareAlike 3.0 Unported License.</p>"""),
            u"", u"")
        self.emphasis = Idevice.NoEmphasis
        self.articleName = u""
        self.article = TextAreaField(x_(u"Article"))
        self.article.idevice = self
        self.images = {}
        self.site = defaultSite
        self.icon = u"inter"
        self._langInstruc = x_(u"""Select the appropriate language version 
of Wikipedia to search and enter search term.""")
        self._searchInstruc = x_("""Enter a phrase or term you wish to search 
within Wikipedia.""")
        self.ownUrl = ""
        self.systemResources += ['exe_wikipedia.css']
 def __init__(self):
     """
     Initialize 
     """
     self.title = _("Feedback")
     self.class_ = "Feedback"
     self.author = "Dimitri Vorona"
     self.purpose = _("Feedback to the author")
     self.tip = _("Use it to put a feedback link to your documents")
     if self.class_ in ("objectives", "activity", "reading", "preknowledge"):
         icon = class_
     else:
         icon = None
     Idevice.__init__(self, self.title, self.author, self.purpose, \
         self.tip, None)
     self.icon    = u"question"
     self.address = ""
     self.subject = "" 
     self.comment = ""
     self.instruc = _("Use this iDevice to put feedback link in your" + \
         "documents")
     self.fields  = []
     self.nextFieldId = 0
     self.group = Idevice.Communication
     self.systemResources.append('common.js')
     self.systemResources.append('libot_drag.js')
Example #6
0
    def __init__(self):
        """
        Initialize 
        """
        Idevice.__init__(
            self,
            x_(u"SCORM Quiz"),
            x_(u"University of Auckland"),
            x_(
                u"""Unlike the MCQ the SCORM quiz is used to test 
the learners knowledge on a topic without providing the learner with feedback 
to the correct answer. The quiz will often be given once the learner has had 
time to learn and practice using the information or skill.
 """
            ),
            u"",
            "question",
        )
        self.isQuiz = True
        self.emphasis = Idevice.SomeEmphasis
        self.score = -1
        self.isAnswered = True
        self.passRate = "50"
        self.questions = []
        self.addQuestion()
        self.systemResources += ["common.js"]
Example #7
0
    def __init__(self, defaultImage = None):
        Idevice.__init__(self, 
                         x_(u"Image Magnifier"), 
                         x_(u"University of Auckland"), 
                         x_(u"""The image magnifier is a magnifying tool enabling
 learners to magnify the view of the image they have been given. Moving the 
magnifying glass over the image allows larger detail to be studied."""), 
                         u"", u"")
        self.emphasis                    = Idevice.NoEmphasis
        self.imageMagnifier              = MagnifierField(
                                           x_(u"Choose an Image"), x_(u"""Click 
on the picture below or the "Add Image" button to select an image file to be 
magnified."""))
        self.imageMagnifier.idevice      = self
        self.imageMagnifier.defaultImage = defaultImage
        self.text                        = TextAreaField(x_(u"Text"),
                                           x_("""Enter the text you wish to 
associate with the file."""))
        self.text.idevice                = self
        self.float                       = u"left"
        self.caption                     = u""
        self._captionInstruc             = x_(u"""Provide a caption for the 
image to be magnified.""")
        self._dimensionInstruc           = x_(u"""Choose the size you want 
your image to display at. The measurements are in pixels. Generally, 100 
pixels equals approximately 3cm. Leave both fields blank if you want the 
image to display at its original size.""")
        self._alignInstruc               = x_(u"""Alignment allows you to 
choose where on the screen the image will be positioned.""")
        self._initialZoomInstruc         = x_(u"""Set the initial level of zoom 
when the IDevice loads, as a percentage of the original image size""")
        self._maxZoomInstruc             = x_(u"""Set the maximum level of zoom, 
as a percentage of the original image size""")
        self._glassSizeInstruc           = x_(u"""Select the size of the magnifying glass""")
        self.systemResources            += ['mojomagnify.js']
Example #8
0
    def __init__(self, parentNode=None):
        """
        Sets up the idevice title and instructions etc.
        """
        Idevice.__init__(self, 
                         x_(u"Java Applet"), 
                         x_(u"University of Auckland"), 
                         u"",
                         u"",
                         u"",
                             parentNode)
        self.emphasis          = Idevice.NoEmphasis
        self.appletCode        = u""
        self.type              = u"other"
        self._fileInstruc      = x_(u"""Add all the files provided for the applet
except the .txt file one at a time using the add files and upload buttons. The 
files, once loaded will be displayed beneath the Applet code field.""")
        self._codeInstruc      = x_(u""""Find the .txt file (in the applet file) 
and open it. Copy the contents of this file <ctrl A, ctrl C> into the applet 
code field.""")
        self._typeInstruc     = x_(u""" <p>If the applet you're adding was generated 
by one of the programs in this drop down, please select it, 
then add the data/applet file generated by your program. </p>
<p>eg. For Geogebra applets, select geogebra, then add the .ggb file that 
you created in Geogebra.</p>""")
        self.message          = ""
Example #9
0
    def __init__(self, activity="", answer=""):
        """
        Initialize 
        """
        Idevice.__init__(
            self, x_(u"FPD - Reflexiona (con Retroalimentacion)"),
            x_(u"University of Auckland"),
            x_(u"""Reflection is a teaching method often used to 
connect theory to practice. Reflection tasks often provide learners with an 
opportunity to observe and reflect on their observations before presenting 
these as a piece of academic work. Journals, diaries, profiles and portfolios 
are useful tools for collecting observation data. Rubrics and guides can be 
effective feedback tools."""), u"", u"reflexionfpd")
        #        self.emphasis         = Idevice.SomeEmphasis
        self.emphasis = "_reflexionfpd"
        self._activityInstruc = x_(u"""Enter a question for learners 
to reflect upon.""")
        self._answerInstruc = x_(u"""Describe how learners will assess how 
they have done in the exercise. (Rubrics are useful devices for providing 
reflective feedback.)""")
        self.systemResources += ["common.js"]

        self.activityTextArea = TextAreaField(x_(u'Reflective question:'),
                                              self._activityInstruc, activity)
        self.activityTextArea.idevice = self

        self.answerTextArea = TextAreaField(x_(u'Feedback:'),
                                            self._answerInstruc, answer)
        self.answerTextArea.idevice = self
Example #10
0
    def __init__(self):
        """
        Initialize 
        """
        Idevice.__init__(
            self, x_(u"True-False Question"), x_(u"University of Auckland"),
            x_(u"""True/false questions present a statement where 
the learner must decide if the statement is true. This type of question works 
well for factual information and information that lends itself to either/or 
responses."""), u"", u"question")
        self.emphasis = Idevice.SomeEmphasis
        self._hintInstruc = x_(u"""A hint may be provided to assist the 
learner in answering the question.""")
        self.questions = []
        self._questionInstruc = x_(u"""Type the question stem. The question 
should be clear and unambiguous. Avoid negative premises as these can tend to 
be ambiguous.""")
        self._keyInstruc = ""
        self._feedbackInstruc = x_(u"""Enter any feedback you wish to provide 
to the learner. This field may be left blank. if this field is left blank 
default feedback will be provided.""")
        self.questions.append(TrueFalseQuestion(self))
        self.systemResources += [
            "common.js", "panel-amusements.png", "stock-stop.png"
        ]
        self.instructionsForLearners = TextAreaField(
            x_(u'Instructions'),
            x_(u"""Provide instruction on how the True/False Question should be 
completed."""), u'')

        self.instructionsForLearners.idevice = self
Example #11
0
    def __init__(self):
        """
        Initialize 
        """
        self.title = _("Pdf iDevice")
        self.class_ = "Pdf Device"
        self.author = "Dimitri Vorona"
        self.purpose = _("Import local pdf and display them with Acrobat Reader plugin (must be installed first)")

        self.file = None
        self.path = ""
        self.group = ""
        self.pages = ""
        self.height = "500"
        self.emphasis = Idevice.NoEmphasis
        tip = ""
        if self.class_ in ("objectives", "activity", "reading", "preknowledge"):
            icon = class_
        else:
            icon = None
        Idevice.__init__(self, self.title, self.author, self.purpose, "", None)
        self.group = Idevice.Content
        self.pagesInstruc = _(
            "Input coma-separated pages or page ranges to import. For example: 1,2,3-8. Leave empty to import all pages"
        )
        self.appletInstruc = _(
            "This applet imports a local pdf into your package. It can also import specified pages only"
        )
        self.icon = icon
        self.fields = []
        self.nextFieldId = 0
        self.systemResources.append("common.js")
        self.systemResources.append("libot_drag.js")
Example #12
0
    def __init__(self, defaultImage = None):
        Idevice.__init__(self, 
                         x_(u"Image with Text"), 
                         x_(u"University of Auckland"), 
                         x_(u"""<p>
The image with text iDevice can be used in a number of ways to support both
the emotional (affective) and learning task (cognitive) dimensions of eXe
content. 
</p><p>
<b>Integrating visuals with verbal summaries</b>
</p><p>
Cognitive psychologists indicate that presenting learners with a
representative image and corresponding verbal summary (that is presented
simultaneously) can reduce cognitive load and enhance learning retention.
This iDevice can be used to present an image (photograph, diagram or
graphic) with a brief verbal summary covering the main points relating to
the image. For example, if you were teaching the functions of a four-stroke
combustion engine, you could have a visual for each of the four positions of
the piston with a brief textual summary of the key aspects of each visual.
</p>"""), u"", u"")
        self.emphasis           = Idevice.NoEmphasis
        self.group              = Idevice.Media
        self.image              = ImageField(x_(u"Image"), u"")
        self.image.idevice      = self
        self.image.defaultImage = defaultImage
        self.text               = TextAreaField(x_(u"Text"),
                                                x_("""Enter the text you wish to 
                                                associate with the image."""))
        self.text.idevice       = self
        self.float              = u"left"
        self.caption            = u""
        self._captionInstruc    = x_(u"""Provide a caption for the image 
you have just inserted.""")
Example #13
0
 def __init__(self):
     """
     Initialize 
     """
     self.title = _("Pdf iDevice")
     self.class_ = "Pdf Device"
     self.author = "Dimitri Vorona"
     self.purpose = _("Import local pdf and display them with Acrobat Reader plugin (must be installed first)")
     
     self.file = None 
     self.path = ""
     self.group = ""
     self.pages = ""
     self.height = '500'
     self.emphasis = Idevice.NoEmphasis
     tip = ""
     if self.class_ in ("objectives", "activity", "reading", "preknowledge"):
         icon = class_
     else:
         icon = None
     Idevice.__init__(self, self.title, self.author, self.purpose, \
     "", None)
     self.group = Idevice.Content
     self.pagesInstruc = _("Input coma-separated pages or page ranges to import. For example: 1,2,3-8. Leave empty to import all pages")
     self.appletInstruc = _("This applet imports a local pdf into your package. It can also import specified pages only")
     self.icon    = icon
     self.fields  = []
     self.nextFieldId = 0
     self.systemResources.append('common.js')
     self.systemResources.append('libot_drag.js')
Example #14
0
    def __init__(self):
        """
        Initialize 
        """
        Idevice.__init__(self,
                         x_(u"True-False Question"),
                         x_(u"University of Auckland"),
                         x_(u"""True/false questions present a statement where 
the learner must decide if the statement is true. This type of question works 
well for factual information and information that lends itself to either/or 
responses."""), u"", u"question")
        self.emphasis         = Idevice.SomeEmphasis
        self._hintInstruc     = x_(u"""A hint may be provided to assist the 
learner in answering the question.""")
        self.questions        = []
        self._questionInstruc = x_(u"""Type the question stem. The question 
should be clear and unambiguous. Avoid negative premises as these can tend to 
be ambiguous.""")
        self._keyInstruc      = ""
        self._feedbackInstruc = x_(u"""Enter any feedback you wish to provide 
to the learner. This field may be left blank. if this field is left blank 
default feedback will be provided.""")
        self.questions.append(TrueFalseQuestion(self))
        self.systemResources += ["common.js", "libot_drag.js",
                                 "panel-amusements.png", "stock-stop.png"]
        self.instructionsForLearners = TextAreaField(
            x_(u'Instructions'),
            x_(u"""Provide instruction on how the True/False Question should be 
completed."""),
            u'')
        self.instructionsForLearners.idevice = self
 def __init__(self, content=""):
     Idevice.__init__(self, x_(u"Image Map"), 
          x_(u"Mike Dawson, Ustad Mobile"), 
          x_(u"""Image Map Idevice with tooltips, sound support."""), 
          "", "")
     self.emphasis = Idevice.SomeEmphasis
     self.message = ""
     
     mainFieldOrder = ["title", "instructions", "mapImg"]
     mainFieldsInfo = \
         {'title' : ['text', x_('Title'), x_('Title'),
                     {"default_prompt" : x_("Type your title here")}],
          'instructions' : ['textarea', x_('Instructions to show'), 
                            x_('Instructions'), 
                            {"default_prompt" : """Enter instructions
                             for the students here; e.g. click on the
                             areas below for more information to
                              popup"""}],
          'mapImg' : ['image', x_('Image'), x_('Use for map background'),
                      {"defaultval" : "imagemap_defaultbg.png" } ]
          }
     
     self.mainFieldSet = ExtendedFieldSet(self, mainFieldOrder, mainFieldsInfo)
     self.mainFieldSet.makeFields()
     
     #The areas with coordinates
     self.map_areas = []
     
     self.add_map_area(num_areas_to_add=2)
     
     #use the new system_scripts method
     self.system_scripts = ["imagemapidevice.js", \
                                 "jquery.tooltipster.js",
                                 "tooltipster.css",
                                 "jquery.rwdImageMaps.js"]
Example #16
0
 def __init__(self):
     """
     Initialize 
     """
     self.title = _("Feedback")
     self.class_ = "Feedback"
     self.author = "Dimitri Vorona"
     self.purpose = _("Feedback to the author")
     self.tip = _("Use it to put a feedback link to your documents")
     if self.class_ in ("objectives", "activity", "reading",
                        "preknowledge"):
         icon = class_
     else:
         icon = None
     Idevice.__init__(self, self.title, self.author, self.purpose, \
         self.tip, None)
     self.icon = u"question"
     self.address = ""
     self.subject = ""
     self.comment = ""
     self.instruc = _("Use this iDevice to put feedback link in your" + \
         "documents")
     self.fields = []
     self.nextFieldId = 0
     self.group = Idevice.Communication
     self.systemResources.append('common.js')
     self.systemResources.append('libot_drag.js')
Example #17
0
    def __init__(self, content=""):
        Idevice.__init__(
            self,
            x_(u"Free Text"),
            x_(u"University of Auckland"),
            x_(
                u"""The majority of a learning resource will be 
establishing context, delivering instructions and providing general information.
This provides the framework within which the learning activities are built and 
delivered."""
            ),
            "",
            "",
        )
        self.emphasis = Idevice.NoEmphasis
        self.content = TextAreaField(
            x_(u"Free Text"),
            x_(
                u"""Use this field to enter text. This 
iDevice has no emphasis applied although limited formatting can be applied to 
text through the text editing buttons associated with the field."""
            ),
            content,
        )
        self.content.idevice = self
        if content:
            self.edit = False
    def __init__(self, title, class_, author, purpose, tip):
        """
        Initialize 
        """
        if class_ in ("objectives", "activity", "reading", "preknowledge", "devsummary", "devpreview", "devresource","devdiscussion"):
            icon = class_
        else:
            icon = None
        Idevice.__init__(self, title, author, purpose, tip, icon)
        self.class_  = class_
        self.icon    = icon
	#added for own icons kthamm 111027
	if class_ in ("devsummary", "devpreview"):
            self.icon = u"sharedmetainformation"
        #end added kthamm

	#added for own icons kthamm 111028
	if class_ in ("devresource"):
            self.icon = u"resources"
        #end added kthamm

	#added for own icons kthamm 111028
	if class_ in ("devdiscussion"):
            self.icon = u"groupdiscussion"
        #end added kthamm

        self.fields  = []
        self.nextFieldId = 0
        self.systemResources.append('common.js')
        self.systemResources.append('libot_drag.js')
Example #19
0
    def __init__(self, defaultSite):
        Idevice.__init__(
            self,
            x_(u"Wiki Article"),
            x_(u"University of Auckland"),
            x_(
                u"""<p>The Wikipedia iDevice allows you to locate 
existing content from within Wikipedia and download this content into your eXe 
resource. The Wikipedia Article iDevice takes a snapshot copy of the article 
content. Changes in Wikipedia will not automatically update individual snapshot 
copies in eXe, a fresh copy of the article will need to be taken. Likewise, 
changes made in eXe will not be updated in Wikipedia. </p> <p>Wikipedia content 
is covered by the GNU free documentation license.</p>"""
            ),
            u"",
            u"",
        )
        self.emphasis = Idevice.NoEmphasis
        self.articleName = u""
        self.article = TextAreaField(x_(u"Article"))
        self.article.idevice = self
        self.images = {}
        self.site = defaultSite
        self.icon = u"inter"
        self.systemResources += ["fdl.html"]
        self._langInstruc = x_(
            u"""Select the appropriate language version 
of Wikipedia to search and enter search term."""
        )
        self._searchInstruc = x_(
            """Enter a phrase or term you wish to search 
within Wikipedia."""
        )
        self.ownUrl = ""
Example #20
0
    def __init__(self):
        """
        Initialize 
        """
        Idevice.__init__(self,
                         x_(u"Multi-select"),
                         x_(u"University of Auckland"),
                         x_(u"""Although more often used in formal testing 
situations MCQs can be used as a testing tool to stimulate thought and  
discussion on topics students may feel a little reticent in responding to. 
When designing a MCQ test consider the following:
<ul>
<li> What learning outcomes are the questions testing</li>
<li>    What intellectual skills are being tested</li>
<li> What are the language skills of the audience</li>
<li> Gender and cultural issues</li>
<li> Avoid grammar language and question structures that might provide 
     clues</li>
</ul>
 """), x_(u"""When building an MCQ consider the following: <ul>
<li> Use phrases that learners are familiar with and have 
encountered in their study </li>
<li> Keep responses concise </li>
<li> There should be some consistency between the stem and the responses </li>
<li> Provide enough options to challenge learners to think about their response
</li>
<li> Try to make sure that correct responses are not more detailed than the 
distractors </li>
<li> Distractors should be incorrect but plausible </li>
</ul>
"""), u"", "question")
        self.emphasis   = Idevice.SomeEmphasis
        self.questions  = []
        self.addQuestion()
        self.systemResources += ["common.js"]
Example #21
0
    def __init__(self, defaultImage = None):
        Idevice.__init__(self, 
                         x_(u"Image Magnifier"), 
                         x_(u"University of Auckland"), 
                         x_(u"""The image magnifier is a magnifying tool enabling
 learners to magnify the view of the image they have been given. Moving the 
magnifying glass over the image allows larger detail to be studied."""), 
                         u"", u"")
        self.emphasis                    = Idevice.NoEmphasis
        self.imageMagnifier              = MagnifierField(
                                           x_(u"Choose an Image"), x_(u"""Click 
on the picture below or the "Add Image" button to select an image file to be 
magnified."""))
        self.imageMagnifier.idevice      = self
        self.imageMagnifier.defaultImage = defaultImage
        self.text                        = TextAreaField(x_(u"Text"),
                                           x_("""Enter the text you wish to 
associate with the file."""))
        self.text.idevice                = self
        self.float                       = u"left"
        self.caption                     = u""
        self._captionInstruc             = x_(u"""Provide a caption for the 
image to be magnified.""")
        self._dimensionInstruc           = x_(u"""Choose the size you want 
your image to display at. The measurements are in pixels. Generally, 100 
pixels equals approximately 3cm. Leave both fields blank if you want the 
image to display at its original size.""")
        self._alignInstruc               = x_(u"""Alignment allows you to 
choose where on the screen the image will be positioned.""")
        self._initialZoomInstruc         = x_(u"""Set the initial level of zoom 
when the IDevice loads, as a percentage of the original image size""")
        self._maxZoomInstruc             = x_(u"""Set the maximum level of zoom, 
as a percentage of the original image size""")
        self._glassSizeInstruc           = x_(u"""Select the size of the magnifying glass""")
        self.systemResources            += ['mojomagnify.js']
Example #22
0
 def delete(self):
     """
     delete an iDevice from it's parentNode and forums cache
     """
     if self.isAdded:
         self.forum.deleteDiscussion(self.discussion)
         self.forumsCache.deleteForum(self.forum)
     Idevice.delete(self)
Example #23
0
    def __init__(self, iDeviceDir=None):
        """
        Initialize JS IDevice
        """
        self._iDeviceDir = str(iDeviceDir)

        self._valid = False
        self._checkValid()

        if self._valid:

            # Get XML values from the config file
            xmlValues = self.__loadIdevice()
            # Add the values not present on the XML
            xmlValues = self.__fillIdeviceDefaultValues(xmlValues)

            self._attributes = xmlValues

            # xml node : [ label , 0=textfield 1=textarea , order into form]
            _attributespre = {
                'title': ['Title', 0, 0],
                'category': ['Category', 0, 1],
                'css-class': ['CSS class', 0, 2],
                'icon': ['Icon', 0, 3]
            }

            self._attributes = sorted(_attributespre.items(),
                                      key=lambda t: t[1][2])

            # Initialize the IDevice instance
            Idevice.__init__(self, xmlValues['title'], xmlValues['author'],
                             xmlValues['purpose'], xmlValues['tip'],
                             xmlValues['icon'])

            # CSS class
            self.class_ = xmlValues['css-class']

            if 'category' in xmlValues:
                self.ideviceCategory = xmlValues['category']

            if 'icon' in xmlValues:
                self.icon = xmlValues['icon']

            # Initialize resources list
            self._editionResources = []
            self._exportResources = []

            # Initialize field arrays
            self.fields = []
            self.nextFieldId = 0

            # Set IDevice emphasis
            self.emphasis = Idevice.SomeEmphasis

            # Add default JS Idevice fields
            self.__addDefaultFields()
            self.__getFolderResources()
Example #24
0
    def __init__(self, content=""):
        Idevice.__init__(
            self, _(u"Example Example"), _(u"University of Auckland"),
            _(u"""This is an example of a user created
iDevice plugin."""), "", "")
        self.emphasis = Idevice.NoEmphasis
        self.content = TextAreaField(_(u"Example"),
                                     _(u"This is a free text field."), content)
        self.content.idevice = self
Example #25
0
    def __init__(self, content=""):
        Idevice.__init__(self, x_(u"Hangman Game"), 
                         x_(u"Mike Dawson, Toughra Technologies FZ LLC"), 
                         x_(u"""Hangman style word game with customizable images."""), "", "")
        self.emphasis = Idevice.SomeEmphasis
        self.message = ""
        
        self.titleField = TextField(x_("Title"), x_("Title"))

        self.chanceImageFields = []
        self.content  = TextAreaField(x_(u"Instructions"), 
                                      x_(u"Instructions for Game."), 
                                      content)
        self.content.idevice = self

        #the words that the player will have to guess
        self.wordTextFields = []

        #the corresponding hints that will be shown for the player in game
        self.hintTextFields = []

        self.content.idevice = self
        self.addChance()
        self.addWord()

        #the alphabet (available letters)
        self.alphabet = TextField(x_(u"Alphabet to Select From"), x_(u"Alphabet to show players"), \
                                  x_("abcdefghijklmnopqrstuvwxyz"))
        self.alphabet.idevice = self

        #messages for the player
        self._initNewAlerts()
        
        self.letterButtonStyle = TextField(x_("Letter Button Style"), \
                x_("Style of button to start with"), "color: white; background-color: blue;")
        self.letterButtonStyle.idevice = self

        self.wrongLetterButtonStyle = TextField(x_("Letter Button Style Wrong Guess"), \
                x_("Style of letter button after wrong guess"), "color: white; background-color: red;")
        self.wrongLetterButtonStyle.idevice = self

        self.rightLetterButtonStyle = TextField(x_("Letter Button Style Right Guess"), \
                x_("Style of letter button after correct guess"), "color: white; background-color : green;")
        self.rightLetterButtonStyle.idevice = self
        
        self.hintFieldStyle = TextField(x_("Style of Hint Text Field"), x_("Hint Text Field CSS"))
        self.hintFieldStyle.idevice = self

        self.wordAreaStyle = TextField(x_("Style of Word Display Field"), x_("Word Display CSS"))
        self.wordAreaStyle.idevice = self

        self.resetButtonText = TextField(x_("Restart Level Button Text"), x_("Text for reset button"), x_("Restart"))
        self.resetButtonText.idevice = self

        self.resetButtonStyle = TextField(x_("Restart Level Button Style (CSS)"), x_("Style of Reset Button"), "background-color: blue; color: white;")  
        self.resetButtonStyle.idevice = self
Example #26
0
    def __init__(self, content=""):
        Idevice.__init__(self, _(u"Example Example"), 
                         _(u"University of Auckland"), 
                         _(u"""This is an example of a user created
iDevice plugin."""), "", "")
        self.emphasis = Idevice.NoEmphasis
        self.content  = TextAreaField(_(u"Example"), 
                                      _(u"This is a free text field."), 
                                      content)
        self.content.idevice = self
 def testCmp(self):
     idevice0 = Idevice("FirstIdevice", "", "", "", "")
     idevice1 = Idevice("SecondIdevice", "", "", "", "")
     idevice2 = Idevice("ThirdIdevice", "", "", "", "")
     self.assertEquals(idevice2.__cmp__(idevice1), 1)
     self.assertEquals(idevice1.__cmp__(idevice0), 1)
     self.assertEquals(idevice0.__cmp__(idevice2), -1)
Example #28
0
    def __init__(self):
        Idevice.__init__(
            self,
            x_(u"Attachment"),
            x_(u"University of Auckland"),
            x_(
                u"The attachment iDevice is used to attach "
                "existing files to your .elp content. For example, "
                "you might have a PDF file or a PPT or .ODP presentation "
                "file that you wish the learners to have access "
                "to, these can be attached and labeled to indicate "
                "what the attachment is and how large the file is. "
                "Learners can click on the attachment link and can "
                "download the attachment."
            ),
            u"",
            u"",
        )

        self.emphasis = Idevice.NoEmphasis
        self.label = u""

        self._descriptionInstruc = x_(
            u"Enter the text you wish to associate "
            u"with the downloaded file. You might "
            u"want to provide instructions on what "
            u"you require the learner to do once "
            u"the file is downloaded or how the "
            u"material should be used."
        )

        self.descriptionTextArea = TextAreaField(x_(u"Description:"), self._descriptionInstruc, u"")
        self.descriptionTextArea.idevice = self

        self._filenameInstruc = x_(
            u"Click <strong>Select a file</strong>, " "browse to the file you want " "to attach and select it."
        )
        self._labelInstruc = x_(
            u"<p>"
            "Assign a label for the attachment. It "
            "is useful to include the type of file. "
            "Eg. pdf, ppt, .odp, etc."
            "</p>"
            "<p>"
            "Including the size is also recommended so "
            "that after your package is exported "
            "to a web site, people will have an idea "
            "how long it would take to download this "
            "attachment."
            "</p>"
            "<p>"
            "For example: "
            "<code>Sales Forecast.doc (500kb)</code>"
            "</p>"
        )
Example #29
0
    def __init__(self, question=""):
        """
        Initialize 
        """
        Idevice.__init__(self,
                         x_(u"Multi-choice"),
                         x_(u"University of Auckland"),
                         x_(u"""Although more often used in formal testing 
situations MCQs can be used as a testing tool to stimulate thought and  
discussion on topics students may feel a little reticent in responding to. 
When designing a MCQ test consider the following:
<ul>
<li> What learning outcomes are the questions testing</li>
<li>    What intellectual skills are being tested</li>
<li> What are the language skills of the audience</li>
<li> Gender and cultural issues</li>
<li> Avoid grammar language and question structures that might provide 
     clues</li>
</ul>
 """), x_(u"""When building an MCQ consider the following: <ul>
<li> Use phrases that learners are familiar with and have 
encountered in their study </li>
<li> Keep responses concise </li>
<li> There should be some consistency between the stem and the responses </li>
<li> Provide enough options to challenge learners to think about their response
</li>
<li> Try to make sure that correct responses are not more detailed than the 
distractors </li>
<li> Distractors should be incorrect but plausible </li>
</ul>
"""), u"question")
        self.emphasis         = Idevice.SomeEmphasis
        self.questions        = []
        self.options          = []
        self.question         = ""
        self.hint             = ""
        self._hintInstruc     = x_(u"""Enter a hint here. If you
do not want to provide a hint, leave this field blank.""")
        self._questionInstruc      = x_(u"""Enter the question stem. 
The quest should be clear and unambiguous. Avoid negative premises 
as these can tend to be ambiguous.""")
        self._keyInstruc      = x_(u"""Select the correct option by clicking 
on the radio button.""")
        self._answerInstruc   = x_(u"""Enter the available choices here. 
You can add options by clicking the "Add Another Option" button. Delete options 
by clicking the red "X" next to the Option.""")
        self._feedbackInstruc = x_(u"""Type in the feedback that you want the 
student to see when selecting the particular option. If you don't complete this 
box, eXe will automatically provide default feedback as follows: "Correct 
answer" as indicated by the selection for the correct answer; or "Wrong answer"
for the other options.""")
        self.systemResources += ["common.js", "libot_drag.js",
                                 "panel-amusements.png", "stock-stop.png"]
        self.message          = ""
        self.addQuestion()
Example #30
0
    def __init__(self, activity="", answer=""):
        """
        Initialize 
        """
        Idevice.__init__(self, x_(u"Note"), x_(u"exelearning.net"), u"", u"Note", "")
        self.emphasis = Idevice.SomeEmphasis
        self._commentInstruc = u""
        self.systemResources += ["common.js"]

        self.commentTextArea = TextAreaField(x_(u"Comment:"), self._commentInstruc, answer)
        self.commentTextArea.idevice = self
Example #31
0
 def __init__(self, content=""):
     Idevice.__init__(self, x_(u"Raw iDevice"), 
                      x_(u"Auckland University of Technology"), 
                      "", "", "")
     self.emphasis = Idevice.NoEmphasis
     self.content  = TextField(x_(u"Raw Text"), 
                                   "",
                                   content)
     self.content.idevice = self
     self.icon            = u"inter"
     if content:
         self.edit = False
 def __init__(self, content=""):
     Idevice.__init__(self, x_(u"Glossary"), 
                      x_(u"Technical University Munich"), 
                      x_(u"""Adds a alphabethicaly sorted glossary
                      """), "", "")
     self.emphasis = Idevice.SomeEmphasis
     self.group    = Idevice.Content
     self.terms = []
     self.icon = u"summary"
    
     self.addTerm()
     self.urlInstruc = x_(u"""Add your terms and definitions""")
Example #33
0
 def __init__(self):
     Idevice.__init__(self, x_(u"TOC"), 
                      x_(u"TUM"), 
                      x_(u"""Insert a table of content"""), 
                      u"", u"")
     self.emphasis         = Idevice.NoEmphasis
     self.group            = Idevice.Content
     self.source           = u""
     self.article          = TextAreaField(x_(u"Article"))
     self.article.idevice  = self
     self.images           = {}
     self.icon             = u"inter"
 def __init__(self, content=""):
     Idevice.__init__(self, x_(u"Drag And Drop"), 
                      x_(u"Ustad Mobile."), 
                      x_(u"""Drag/Drop items to correct locations."""), "", "")
     self.emphasis = Idevice.SomeEmphasis
     self.short_desc = "Learner has to drag and drop items into correct places"
     self.message = ""
     
     main_field_order = ["title", "instructions", "positivefeedback",\
                          "negativefeedback","mainImg", "scale"]
     
     
     fb_positive_help_msg = x_("""Enter the default 
                         feedback that will appear when an area is 
                          dragged into the correct drop target
                           area (e.g. feedback is set to by question""")
     
     fb_negative_help_msg = x_("""Enter the default 
                         feedback that will appear when an area is 
                          dragged outside the correct drop target
                           area (e.g. feedback is set to by question""")
     main_field_info  = \
         {'title' : ['text', x_('Title'), x_('Title'),
                     {"default_prompt" : x_("Type your title here")}],\
          'instructions' : ['textarea', x_('Instructions to show'), \
                            x_('Instructions'), 
                            {"default_prompt" : x_("Enter instructions for students here.  You can add images, media, etc. too.")}],\
          'mainImg' : ['image', x_('Background'), x_('Background'),
                       {"defaultval" : "exe_dnd_defaultbackgroundworld.jpg"} ],\
          'positivefeedback' : ['textarea',\
                            x_('Default Correct Answer Feedback'),\
                            fb_positive_help_msg,
                             {"default_prompt" : fb_positive_help_msg}],
          'negativefeedback' : ['textarea',\
                            x_('Default Wrong Answer Feedback'),\
                            fb_negative_help_msg, 
                            {"default_prompt" :fb_negative_help_msg }],\
          'scale' : ['choice', x_('Auto Resize'), \
                       x_('Auto Resize'),{"choices" : \
                      [['scaletofit', x_('Resize to fit screen width')],\
                      ['fixed', x_('Fixed')]]}]
          }
         
     self.area_fields = []
     
     self.main_fields = ExtendedFieldSet(self, main_field_order, main_field_info)
     self.main_fields.makeFields()
     
     self.system_scripts = ["exedragndrop.js", \
                                 "jquery-ui-1.10.4.custom.min.js",
                                 "jquery.ui.touch-punch.min.js"]
     
     self.add_area_fields(2)
Example #35
0
    def __init__(self, content=""):
        Idevice.__init__(self, x_(u"External Web Site"), 
                         x_(u"University of Auckland"), 
                         x_(u"""The external website iDevice loads an external website 
into an inline frame in your eXe content rather then opening it in a popup box. 
This means learners are not having to juggle windows. 
This iDevice should only be used if your content 
will be viewed by learners online."""), "", "")
        self.emphasis = Idevice.NoEmphasis
        self.url      = ""
        self.height   = "300"
        self._urlInstruc = x_(u"""Enter the URL you wish to display
and select the size of the area to display it in.""")
Example #36
0
    def __init__(self, activity="", answer=""):
        """
        Initialize 
        """
        Idevice.__init__(self, x_(u"Note"), x_(u"exelearning.net"), u"",
                         u"Note", "")
        self.emphasis = Idevice.SomeEmphasis
        self._commentInstruc = u""
        self.systemResources += ["common.js"]

        self.commentTextArea = TextAreaField(x_(u'Comment:'),
                                             self._commentInstruc, answer)
        self.commentTextArea.idevice = self
Example #37
0
 def __init__(self, title, class_, author, purpose, tip):
     """
     Initialize 
     """
     if class_ in ("objectives", "activity", "reading", "preknowledge"):
         icon = class_
     else:
         icon = None
     Idevice.__init__(self, title, author, purpose, tip, icon)
     self.class_  = class_
     self.icon    = icon
     self.fields  = []
     self.systemResources += ["common.js", "libot_drag.js"]
    def __init__(self, content=""):
        Idevice.__init__(
            self, x_(u"Place The Objects"),
            x_(u"Mike Dawson / PAIWASTOON Networking Services Ltd."),
            x_(u"""User has to place various objects in the correct place."""),
            "", "")
        self.emphasis = Idevice.SomeEmphasis
        self.content = TextAreaField(x_(u"Instructions"),
                                     x_(u"This is a free text field."),
                                     content)
        self.content.idevice = self

        self.titleField = TextField(x_("Title"), x_("Title"))
        self.titleField.idevice = self

        #This is the main field where objects will be dragged to
        self.mainArea = TextAreaField(
            x_(u"Main Area"),
            x_(u"This is the main image where the user will drag / drop items to"
               ), "")
        self.mainArea.idevice = self

        self.gameTimeLimit = TextField(x_(u"Time Limit (mm:ss)"),
                                       x_(u"(Optional) Game Time Limit"), "")
        self.gameTimeLimit.idevice = self
        self.gameTimerShown = TextField(
            x_(u"Show Timer"),
            x_(u"Even if there is no time limit, show the timer..."), "")
        self.gameTimerShown.idevice = self

        #these are shown when there is a right / wrong response
        self.clickToStartGameArea = TextAreaField(
            x_(u"Message to click game to start"),
            x_(u"This will when clicked start the game"), "")
        self.clickToStartGameArea.idevice = self
        self.positiveResponseArea = TextAreaField(
            x_(u"Positive Response"),
            x_(u"Overlays main area when player correctly places object"), "")
        self.positiveResponseArea.idevice = self
        self.negativeResponseArea = TextAreaField(
            x_(u"Negative Response"),
            x_(u"Overlays main area when player guesses wrong"), "")
        self.negativeResponseArea.idevice = self

        self.partbinNumCols = TextField(x_("Number of Columns in part bin"),
                                        x_("Columns part bin"), "2")
        self.partbinNumCols.idevice = self

        #This is a list of objects to place
        self.objectsToPlace = []
        self.addPlacableObject()
Example #39
0
    def __init__(self, story="", defaultImage=None):
        """
        Initialize 
        """
        Idevice.__init__(
            self,
            x_(u"Case Study"),
            x_(u"University of Auckland"),
            x_(
                u"""A case study is a device that provides learners 
with a simulation that has an educational basis. It takes a situation, generally 
based in reality, and asks learners to demonstrate or describe what action they 
would take to complete a task or resolve a situation. The case study allows 
learners apply their own knowledge and experience to completing the tasks 
assigned. when designing a case study consider the following:<ul> 
<li>	What educational points are conveyed in the story</li>
<li>	What preparation will the learners need to do prior to working on the 
case study</li>
<li>	Where the case study fits into the rest of the course</li>
<li>	How the learners will interact with the materials and each other e.g.
if run in a classroom situation can teams be setup to work on different aspects
of the case and if so how are ideas feed back to the class</li></ul>"""
            ),
            "",
            u"casestudy",
        )
        self.emphasis = Idevice.SomeEmphasis
        self.story = story
        self.questions = []
        self._storyInstruc = x_(
            u"""Create the case story. A good case is one 
that describes a controversy or sets the scene by describing the characters 
involved and the situation. It should also allow for some action to be taken 
in order to gain resolution of the situation."""
        )
        self._questionInstruc = x_(
            u"""Describe the activity tasks relevant 
to the case story provided. These could be in the form of questions or 
instructions for activity which may lead the learner to resolving a dilemma 
presented. """
        )
        self._feedbackInstruc = x_(
            u"""Provide relevant feedback on the 
situation."""
        )
        if defaultImage is None:
            from exe.application import application

            defaultImage = application.config.webDir / "images" / DEFAULT_IMAGE
        self.defaultImage = unicode(defaultImage)
        self.addQuestion()
Example #40
0
    def __init__(self, content=""):
        Idevice.__init__(
            self, x_(u"External Web Site"), x_(u"University of Auckland"),
            x_(u"""The external website iDevice loads an external website 
into an inline frame in your eXe content rather then opening it in a popup box. 
This means learners are not having to juggle windows. 
This iDevice should only be used if your content 
will be viewed by learners online."""), "", "")
        self.emphasis = Idevice.NoEmphasis
        self.url = ""
        self.height = "300"

        self._urlInstruc = x_(u"""Enter the URL you wish to display
and select the size of the area to display it in.""")
    def __init__(self, content=""):
        Idevice.__init__(self, x_(u"Memory Match Game"), 
                         x_(u"Toughra Technologies FZ LLC."),
                         x_(u"""Memory Match Game Maker."""), "", "")
        self.message = ""
        self.short_desc = x_("Game of matching pairs; student can click to reveal two at a time; after which they are re-hidden.  Student has to remember locations to match up all pairs. ")
        
        mainFieldOrder = ['title', 'instructions', 'rows', 'cols', 'splitPairs', 'feedbackpositive', 'feedbacknegative', 'feedbackstyle',  \
                            'hidetime', 'coverImg', 'cellbackImg', 'revealedBackground', 'positivefeedbackeffect', \
                            'negativefeedbackeffect', 'useTimer', 'timertext', 'timerstyle', 'hideAfterMatch', 'hideAfterMatchEffect', 'cellpadding',\
                            'cellspacing', 'cellstyle']

        mainFieldsInfo = {  'title' : ['text', x_('Title'), x_('Title')], \
                            'instructions' : ['textarea', x_('Instructions to show'), x_('Instructions')],\
                            'rows' : ['text', x_('Number of Rows'), x_('Number of Rows'), {'defaultval' : '2'}],\
                            'cols' : ['text', x_('Number of Columns'), x_('Number of Columns'), {'defaultval' : '2'}],\
                            'splitPairs' : ['choice', x_('Split Question/Answer Pairs'), x_('Split Question/Answer Pairs'),\
                                {'choices' : [['true', x_('Yes')], ['false', x_('No')]] }],\
                            'feedbackpositive' : ['textarea', x_('Feedback to show on correct match'), x_('Positive Feedback')],\
                            'feedbacknegative' : ['textarea', x_('Feedback to show on incorrect pair'), x_('Negative Feedback')],\
                            'feedbackstyle' : ['text', x_('Style of Feedback Area (CSS)'), x_('CSS style for feedback area'), {'type': 'advanced'}],\
                            'cellwidth' : ['text', x_('Width of Cells (in pixels)'), x_('Cell Width px'), {'defaultval' : '100'}],\
                            'cellheight' : ['text', x_('Height of Cells (in pixels)'), x_('Cell Height px'), {'defaultval' : '100'}],\
                            'hidetime' : ['text', x_('Time after which to re-hide incorrect match (ms)'), x_('Time to hide'), {'defaultval' : '1000', 'type': 'advanced'}],\
                            'coverImg' : ['image', x_('Cover Image for cells (shown before selected)'), x_('Cover Img'), {'defaultval' : 'memmatch_covercelldefault.png'}],\
                            'cellbackImg' : ['image', x_('Background Image for cells (shown after selected)'), x_('Back Img'), {'defaultval' : 'memmatch_showcelldefaultbg.png'}],\
                            'revealedBackground' : ['image', x_('Background image behind cells shown as cells are hidden'), x_('Bg Img')],\
                            'positivefeedbackeffect' : ['choice', x_('Effect for showing positive feedback'), x_('Positive Feedback Effect'),\
                                {'choices' : EXEFIELD_JQUERYUI_EFFECTLIST } ],\
                            'negativefeedbackeffect' : ['choice', x_('Effect for showing negative feedback'), x_('Negative Feedback Effect'),\
                                {'choices' : EXEFIELD_JQUERYUI_EFFECTLIST } ],\
                            'useTimer' : ['choice', x_('Show / Use a timer?'), x_('Use Timer?'), {'choices' : [['true', 'Yes'], ['false', 'No']]} ],\
                            'hideAfterMatch' : ['choice', x_('Hide Cells after match made?'), x_('Hide after match'), \
                                {'choices' : [['true', x_('Yes')], ['false', x_('No')]]} ],\
                            'hideAfterMatchEffect' : ['choice', x_('Effect when hiding cells after match'), x_('Hide after match effect'), \
                                {'choices' : EXEFIELD_JQUERYUI_EFFECTLIST } ],\
                            'cellpadding' : ['text', x_('Cell Padding in table'), x_('Cell Padding'), {'defaultval' : '0','type': 'advanced'}],\
                            'cellspacing' : ['text', x_('Cell Spacing of table'), x_('Cell Spacing'), {'defaultval' : '0','type': 'advanced'}],\
                            'cellstyle' : ['text', x_('Cell Default Style (CSS)'), x_('Cell Style CSS'), {'defaultval' : 'text-align: center; font: 18pt bold','type': 'advanced'}],\
                            'timertext' : ['text', x_('Text of Timer Label'), x_('Timer Text'), {'type': 'advanced'}],\
                            'timerstyle' : ['text', x_('CSS of Timer Field'), x_('Timer CSS'), {'type': 'advanced'}]\
                        }
        self.mainFieldSet = ExtendedFieldSet(self, mainFieldOrder, mainFieldsInfo)
        self.mainFieldSet.makeFields()
        
        #the pairs of matching items
        self.matchPairFields = []

        self.emphasis = Idevice.SomeEmphasis
Example #42
0
    def __init__(self, content=""):
        Idevice.__init__(self, x_(u"Memory Match Game"),
                         x_(u"Toughra Technologies FZ LLC."),
                         x_(u"""Memory Match Game Maker."""), "", "")
        self.message = ""

        mainFieldOrder = ['title', 'instructions', 'rows', 'cols', 'splitPairs', 'feedbackpositive', 'feedbacknegative', 'feedbackstyle',  \
                            'hidetime', 'coverImg', 'cellbackImg', 'revealedBackground', 'positivefeedbackeffect', \
                            'negativefeedbackeffect', 'useTimer', 'timertext', 'timerstyle', 'hideAfterMatch', 'hideAfterMatchEffect', 'cellpadding',\
                            'cellspacing', 'cellstyle']

        mainFieldsInfo = {  'title' : ['text', x_('Title'), x_('Title')], \
                            'instructions' : ['textarea', x_('Instructions to show'), x_('Instructions')],\
                            'rows' : ['text', x_('Number of Rows'), x_('Number of Rows'), {'defaultval' : '2'}],\
                            'cols' : ['text', x_('Number of Columns'), x_('Number of Columns'), {'defaultval' : '2'}],\
                            'splitPairs' : ['choice', x_('Split Question/Answer Pairs'), x_('Split Question/Answer Pairs'),\
                                {'choices' : [['true', x_('Yes')], ['false', x_('No')]] }],\
                            'feedbackpositive' : ['textarea', x_('Feedback to show on correct match'), x_('Positive Feedback')],\
                            'feedbacknegative' : ['textarea', x_('Feedback to show on incorrect pair'), x_('Negative Feedback')],\
                            'feedbackstyle' : ['text', x_('Style of Feedback Area (CSS)'), x_('CSS style for feedback area'), {'type': 'advanced'}],\
                            'cellwidth' : ['text', x_('Width of Cells (in pixels)'), x_('Cell Width px'), {'defaultval' : '100'}],\
                            'cellheight' : ['text', x_('Height of Cells (in pixels)'), x_('Cell Height px'), {'defaultval' : '100'}],\
                            'hidetime' : ['text', x_('Time after which to re-hide incorrect match (ms)'), x_('Time to hide'), {'defaultval' : '1000', 'type': 'advanced'}],\
                            'coverImg' : ['image', x_('Cover Image for cells (shown before selected)'), x_('Cover Img'), {'defaultval' : 'memmatch_covercelldefault.png'}],\
                            'cellbackImg' : ['image', x_('Background Image for cells (shown after selected)'), x_('Back Img'), {'defaultval' : 'memmatch_showcelldefaultbg.png'}],\
                            'revealedBackground' : ['image', x_('Background image behind cells shown as cells are hidden'), x_('Bg Img')],\
                            'positivefeedbackeffect' : ['choice', x_('Effect for showing positive feedback'), x_('Positive Feedback Effect'),\
                                {'choices' : EXEFIELD_JQUERYUI_EFFECTLIST } ],\
                            'negativefeedbackeffect' : ['choice', x_('Effect for showing negative feedback'), x_('Negative Feedback Effect'),\
                                {'choices' : EXEFIELD_JQUERYUI_EFFECTLIST } ],\
                            'useTimer' : ['choice', x_('Show / Use a timer?'), x_('Use Timer?'), {'choices' : [['true', 'Yes'], ['false', 'No']]} ],\
                            'hideAfterMatch' : ['choice', x_('Hide Cells after match made?'), x_('Hide after match'), \
                                {'choices' : [['true', x_('Yes')], ['false', x_('No')]]} ],\
                            'hideAfterMatchEffect' : ['choice', x_('Effect when hiding cells after match'), x_('Hide after match effect'), \
                                {'choices' : EXEFIELD_JQUERYUI_EFFECTLIST } ],\
                            'cellpadding' : ['text', x_('Cell Padding in table'), x_('Cell Padding'), {'defaultval' : '0','type': 'advanced'}],\
                            'cellspacing' : ['text', x_('Cell Spacing of table'), x_('Cell Spacing'), {'defaultval' : '0','type': 'advanced'}],\
                            'cellstyle' : ['text', x_('Cell Default Style (CSS)'), x_('Cell Style CSS'), {'defaultval' : 'text-align: center; font: 18pt bold','type': 'advanced'}],\
                            'timertext' : ['text', x_('Text of Timer Label'), x_('Timer Text'), {'type': 'advanced'}],\
                            'timerstyle' : ['text', x_('CSS of Timer Field'), x_('Timer CSS'), {'type': 'advanced'}]\
                        }
        self.mainFieldSet = ExtendedFieldSet(self, mainFieldOrder,
                                             mainFieldsInfo)
        self.mainFieldSet.makeFields()

        #the pairs of matching items
        self.matchPairFields = []

        self.emphasis = Idevice.SomeEmphasis
Example #43
0
 def testIsfirstAndIsLast(self):
     parentNode = Node(self.package)
     idevice0 = Idevice("FirstIdevice", "", "", "", "")
     idevice0.setParentNode(parentNode)
     idevice1 = Idevice("SecondIdevice", "", "", "", "")
     idevice1.setParentNode(parentNode)
     idevice2 = Idevice("ThirdIdevice", "", "", "", "")
     idevice2.setParentNode(parentNode)
     
     self.assert_(idevice0.isFirst)
     self.assert_(idevice2.isLast)
Example #44
0
 def __init__(self, title, class_, author, purpose, tip):
     """
     Initialize 
     """
     if class_ in ("objectives", "activity", "reading", "preknowledge"):
         icon = class_
     else:
         icon = None
     Idevice.__init__(self, title, author, purpose, tip, icon)
     self.class_ = class_
     self.icon = icon
     self.originalicon = icon
     self.fields = []
     self.nextFieldId = 0
     self.systemResources.append('common.js')
Example #45
0
 def __init__(self, activity = "", answer = ""):
     """
     Initialize 
     """
     Idevice.__init__(self, 
                      x_(u"FPD - Highlighted"),
                      x_(u"Jose Ramon Jimenez Reyes"), 
                      x_(u"""Highlighted is an iDevice that emphasizes text to catch the student's attention."""), u"", u"destacadofpd")
     self.emphasis         = Idevice.NoEmphasis
     self._activityInstruc = x_(u"""Enter the text that will appear on this iDevice""")
     self.systemResources += ["common.js"]
     
     self.activityTextArea = TextAreaField(x_(u'Highlighted Text:'), 
                                 self._activityInstruc, activity)
     self.activityTextArea.idevice = self
Example #46
0
 def __init__(self, activity = "", answer = ""):
     """
     Initialize 
     """
     Idevice.__init__(self, 
                      x_(u"FPD - Correccion"),
                      x_(u"Jose Ramon Jimenez Reyes"), 
                      x_(u"""Correccion es un iDevice que permite resaltar texto para hacer correcciones a los autores."""), u"", u"correccionfpd")
     self.emphasis         = Idevice.NoEmphasis
     self._activityInstruc = x_(u"""Introduce el texto que aparecer&aacute; en este iDevice""")
     self.systemResources += ["common.js"]
     
     self.activityTextArea = TextAreaField(x_(u'Texto Correci&oacute;n:'), 
                                 self._activityInstruc, activity)
     self.activityTextArea.idevice = self
 def __init__(self, title="", author="", instructions=""):
     Idevice.__init__(self, title, 
                      author, 
                      instructions, "", "")
     default_content = "<div data-idevice-type='%s'></div>" % \
         self.get_idevice_dirname()
     self.content_field = TextAreaField("content_field", "help", 
                                        content= default_content)
     self.message = ""
     self.emphasis = Idevice.SomeEmphasis
     device_name = self.get_idevice_dirname()
     #add this script to the list that needs copied
     script_src = "htmlidevices/%(name)s/%(name)s.js" % {
                                  "name" : device_name}
     self.system_scripts = [script_src]
    def __init__(self, content=""):
        Idevice.__init__(
            self, x_(u"FPD - Texto Libre"), x_(u"University of Auckland"),
            x_(u"""The majority of a learning resource will be 
establishing context, delivering instructions and providing general information.
This provides the framework within which the learning activities are built and 
delivered."""), "", "")
        self.emphasis = Idevice.NoEmphasis
        self.content = TextAreaField(
            x_(u"Free Text"),
            x_(u"""Use this field to enter text. This 
iDevice has no emphasis applied although limited formatting can be applied to 
text through the text editing buttons associated with the field."""), content)
        self.content.idevice = self
        if content:
            self.edit = False
Example #49
0
    def __init__(self, activity = "", answer = ""):
        """
        Initialize 
        """
        Idevice.__init__(self, 
                         x_(u"FPD - Guidelines Teacher"),
                         x_(u"Jose Ramon Jimenez Reyes"), 
                         x_(u"""Guidelines Teacher is an iDevice that lets the teacher know the learning objectives of the students."""), u"", u"orientacionesfpd")
#        self.emphasis         = Idevice.SomeEmphasis
        self.emphasis         = "_orientacionesfpd"
        self._activityInstruc = x_(u"""Enter the text that will appear on this iDevice""")
        self.systemResources += ["common.js"]
        
        self.activityTextArea = TextAreaField(x_(u'Guidelines Teacher Text'), 
                                    self._activityInstruc, activity)
        self.activityTextArea.idevice = self
    def __init__(self, activity = "", answer = ""):
        """
        Initialize 
        """
        Idevice.__init__(self, 
                         x_(u"FPD - A Piece of Advice"),
                         x_(u"Jose Ramon Jimenez Reyes"), 
                         x_(u"""A Piece of Advice is an iDevice that permits the teacher give advice on interesting books, films..."""), u"", u"recomendacionfpd")
#        self.emphasis         = Idevice.SomeEmphasis
        self.emphasis         = "_recomendacionfpd"
        self._activityInstruc = x_(u"""Enter the text that will appear on this iDevice""")
#        self.systemResources += ["common.js"]
        
        self.activityTextArea = TextAreaField(x_(u'A Piece of Advice Text:'), 
                                    self._activityInstruc, activity)
        self.activityTextArea.idevice = self
Example #51
0
    def __init__(self, activity = "", answer = ""):
        """
        Initialize 
        """
        Idevice.__init__(self, 
                         x_(u"FPD - Situation"),
                         x_(u"Jose Ramon Jimenez Reyes"), 
                         x_(u"""Situation is an iDevice that provides the student with a story that will guide her along the learning process."""), u"", u"casopracticofpd")
#        self.emphasis         = Idevice.SomeEmphasis
        self.emphasis         = "_casopracticofpd"
        self._activityInstruc = x_(u"""Enter the text that will appear on this iDevice""")
#        self.systemResources += ["common.js"]
        
        self.activityTextArea = TextAreaField(x_(u'Situation Text:'), 
                                    self._activityInstruc, activity)
        self.activityTextArea.idevice = self
    def __init__(self, activity = "", answer = ""):
        """
        Initialize 
        """
        Idevice.__init__(self, 
                         x_(u"FPD - Quotation"),
                         x_(u"Jose Ramon Jimenez Reyes"), 
                         x_(u"""Quotation is an iDevice that provides the students with quotations to reflect upon."""), u"", u"citasparapensarfpd")
#        self.emphasis = Idevice.SomeEmphasis
        self.emphasis = "_citasparapensarfpd"
        self._activityInstruc = x_(u"""Enter the text that will appear on this iDevice""")
#        self.systemResources += ["common.js"]
        
        self.activityTextArea = TextAreaField(x_(u'Quotation Text:'), 
                                    self._activityInstruc, activity)
        self.activityTextArea.idevice = self
    def __init__(self, activity = "", answer = ""):
        """
        Initialize 
        """
        Idevice.__init__(self, 
                         x_(u"FPD - You Should Know"),
                         x_(u"Jose Ramon Jimenez Reyes"), 
                         x_(u"""You Should Know is an iDevice that helps the student widen her knowledge with core contents."""), u"", u"debesconocerfpd")
#        self.emphasis = Idevice.SomeEmphasis
        self.emphasis = "_debesconocerfpd"
        self._activityInstruc = x_(u"""Enter the text that will appear on this iDevice""")
        self.systemResources += ["common.js"]
        
        self.activityTextArea = TextAreaField(x_(u'You Should Know Text:'), 
                                    self._activityInstruc, activity)
        self.activityTextArea.idevice = self
Example #54
0
    def __init__(self, activity="", answer=""):
        """
        Initialize 
        """
        Idevice.__init__(
            self, x_(u"FPD - Correccion"), x_(u"Jose Ramon Jimenez Reyes"),
            x_(u"""Correccion es un iDevice que permite resaltar texto para hacer correcciones a los autores."""
               ), u"", u"correccionfpd")
        self.emphasis = Idevice.NoEmphasis
        self._activityInstruc = x_(
            u"""Introduce el texto que aparecer&aacute; en este iDevice""")
        self.systemResources += ["common.js"]

        self.activityTextArea = TextAreaField(x_(u'Texto Correci&oacute;n:'),
                                              self._activityInstruc, activity)
        self.activityTextArea.idevice = self
    def __init__(self, activity="", answer=""):
        """
        Initialize 
        """
        Idevice.__init__(
            self, x_(u"FPD - Destacado"), x_(u"Jose Ramon Jimenez Reyes"),
            x_(u"""Destacado es un iDevice que permite resaltar texto para llamar la atenciĆ³n del alumnado."""
               ), u"", u"destacadofpd")
        self.emphasis = Idevice.NoEmphasis
        self._activityInstruc = x_(
            u"""Introduce el texto que aparecer&aacute; en este iDevice""")
        self.systemResources += ["common.js"]

        self.activityTextArea = TextAreaField(x_(u'Texto Destacado:'),
                                              self._activityInstruc, activity)
        self.activityTextArea.idevice = self
Example #56
0
 def clone(self):
     """
     Clone a JS iDevice just like this one
     """
     miniMe = Idevice.clone(self)
     for field in miniMe.fields:
         field.idevice = miniMe
     return miniMe