Beispiel #1
0
 def renderEdit(self):
     """
     Enables the user to set up their passage of text
     """
     html = [
         common.formField('richTextArea', _('Cloze Text'),'',
                          self.editorId, self.field.instruc,
                          self.field.encodedContent),
         u'<table style="width: 100%;">',
         u'<tbody>',
         u'<tr>',
         u'<td>',
         u'  <input type="button" value="%s" ' % _("Hide/Show Word")+
         ur"""onclick="tinyMCE.execInstanceCommand('mce_editor_1','Underline', false);"/>"""
         u'</td><td>',
         common.checkbox('strictMarking%s' % self.id,
                         self.field.strictMarking,
                         title=_(u'Strict Marking?'),
                         instruction=self.field.strictMarkingInstruc),
         u'</td><td>',
         common.checkbox('checkCaps%s' % self.id,
                         self.field.checkCaps,
                         title=_(u'Check Caps?'),
                         instruction=self.field.checkCapsInstruc),
         u'</td><td>',
         common.checkbox('instantMarking%s' % self.id,
                         self.field.instantMarking,
                         title=_(u'Instant Marking?'),
                         instruction=self.field.instantMarkingInstruc),
         u'</td>',
         u'</tr>',
         u'</tbody>',
         u'</table>',
         ]
     return '\n    '.join(html)
    def renderEdit(self, style):
        """
        Returns an XHTML string with the form element for editing this block
        """
        html  = u"<div>\n"
        html += self.titleElement.renderEdit()
        html += self.contentElement.renderEdit()
        html += self.mainAreaElement.renderEdit()

        html +=u"<strong>"+_("Game Options") +"</strong>"
        
        html += self.clickToStartElement.renderEdit()
        html += self.positiveResponseElement.renderEdit()
        html += self.negativeResponseElement.renderEdit()
        html += self.partbinNumCols.renderEdit()
        """
        Timer Options
        """
        html += "<input type='hidden' name='checktimer%s' value='true'/>" % self.id
        html += common.checkbox("enabletimer%s" % self.id, self.idevice.gameTimerShown.content, \
                title=_("Enable Timer"), instruction=_("Enable showing the timer in the game"))
        html += self.gameTimeLimit.renderEdit()

        for placableObjectElement in self.placableObjectElements:
            html += placableObjectElement.renderEdit()
        
        html += "<br/>"
        html += common.submitButton("addPlacableObject"+unicode(self.id), _("Add Placable Object"))
        html += "<br/>"
        
        
        html += self.renderEditButtons()
        html += u"</div>\n"
        return html
Beispiel #3
0
 def renderEdit(self):
     """
     Returns an XHTML string for editing this option element
     """
     html = u"<tr><td>"
     html += common.textArea("ans"+self.id, self.field.answer,rows="4")
     html += "</td><td align=\"center\">\n"
     html += common.checkbox("c"+self.id, 
                           self.field.isCorrect, self.index)
     html += "</td><td>\n"
     html += common.submitImage("del"+self.id, self.field.idevice.id, 
                                "/images/stock-cancel.png",
                                _(u"Delete option"))
     html += "</td></tr>\n"
     return html